@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27



Comments:

<0> I'm out
<1> Can I convert the following 2 queries in a single one ? http://pastebin.com/724115 ?
<2> crywolf: why you say that for?
<3> tdd1984: if you database server supports that which i doubt it will
<4> tdd1984: because php3 is very obsolete. You might want to find a tutorial or book which mentions php5
<2> flaccid: i think it does
<3> what db server is it
<2> crywolf: php5 is also newer
<2> mysqladmin
<4> that's the problem with tutorials. Those that aren't pure crap are obsolete.
<3> i havnt heard of such a thing in mysql, ask in #mysql
<4> tdd1984: if you use an old tutorial, you're going to pick up a lot of bad habits
<2> Crywolf: true
<2> brb
<3> php3 didn't even support sessions
<4> and the superglobals didn't exist until 4.1



<5> CryWolf, lol moores law #19, The good tutorials that arent pure crap are mostly obsolete
<6> what's the deal with global; ?
<6> I have a variable that I want available in several functions
<6> it's called $user, it's an array of users settings
<5> whats the most nested ifs you have ever had?
<3> we are talking about the php superglobals not php vars
<3> tama00: probably about a dozen
<5> nice i cranked out 8 ifs and 6 elses just then and im wondering maybe i over did it..
<3> not a bad list on the superglobals and security http://www.linuxjournal.com/article/6559
<7> ffs
<3> you can use switch statement as well and there are other more advanced techniques which i need to learn as well
<8> I'm running php5 with apache2 on Ubuntu breezy. It seems to be missing some functionality - tidy_parse_file() for example.
<6> like $user['id'].. whatever, anyway, I create it from a query and I want to global $user; in my function so I don't have to keep querying the database, but it won't let me?
<6> "it wont let me", sorry, when I global $user, it won't let me access it or print it.
<9> I know it's a problem with wordpress but can someone help me figure out if else?
<5> flaccid, yeah but i was using differnt data types :(
<6> tama00: switch() is your best friend, I think the most if i've had in one tree of logic was like 7
<5> flaccid, and switches arent nested;)
<8> Know where I can get that functionality from, or will I need to compile from source?
<5> enless you had nested switches..
<6> tama00: if you use logic well and group your responses instead of if ($blah == 1) { ... } like, if ($blah == 1) && ($var !=2) {... }
<4> mlambie: did you install the tidy pecl extension, and do you have libtidy installed?
<8> libtidy is installed
<8> i'll check for the pecl extension
<3> nothing is nested, until you nest it. you can put a switch in a nested logic block
<4> tek_: what happens when you try?
<6> CryWolf: It's like it never existed
<6> CryWolf: I'm making a function right now to return the array, then I will see if I can global that
<5> flaccid, sure thing you can also put ifs within the switch
<5> flaccid, within the switches expressions shall i say..
<6> The first problem was simple, I was creating the $user INSIDE a function
<6> then doing global $user; inside another function being executed within that function
<3> yes if statement in the switch cases
<6> a sort of ... function blah($vars) { $blah = another_function() }
<7> got a problem
<6> and another_function contained the global call
<4> tek_: so $user does not exist in the global scope at the time you call the second function
<6> CryWolf, correct
<4> tek_: $GLOBALS['user']
<5> :)
<4> or p*** $user to the other function
<6> which way is better
<3> i'd p*** it to the function to minimise on the global
<4> agreed
<6> so far global has been great
<3> they should be private variables to the function
<6> I've only used it for retrieving the database abstraction layer
<6> this isn't a cl*** method flaccid
<3> ok
<9> how would I use an if statement to check if a tag needs closed before a variable is inserted
<4> using $GLOBALS isn't quite as bad as global, as it's a little more clear, but p***ing the variable avoids unexpected changes.
<6> CryWolf, makes esense
<6> sense
<3> so non cl*** methods use either local or global php vars
<4> also looking at the function declaration line and seeing that it wants $user is more immediately clear than suddenly seeing it inside the function.
<6> flaccid, they just use variables
<6> CryWolf, yeah
<6> CryWolf but can I p*** an object that way?
<4> tek_: an object is a variable
<6> instead of making a global of my database objet ($d) can I just p*** it ?
<3> yes i was saying they have access to only php local or global



<3> make a db connection cl*** ?
<10> hi! how to cut multistring part from the data using to regexps as limits?
<6> that's what $d is, it's an object with my methods
<3> just create the object and do $object->method ?
<6> nevermind.
<3> please explain?
<6> It's okay
<6> I don't need to understand that part
<6> It already works fine.
<9> How would I have $images only appear in certain divs when called dynamically?
<5> can you make structures or records as they call them in php?
<4> philovirus: can you be more specific?
<3> tama00: don't understand
<9> crywolf: I'm writing a wordpress plugin that will add an anchor link after the $title. However some themes call the_title in many places other than at the top of a post.
<9> I need to make the function somehow make sure it's only putting it into a post.
<5> flaccid, its a type of data structure
<9> http://cdcstudios.com/wptest (it's a really sloppy version right now)
<4> philovirus: I'd ask in #wordpress to see if there's an easy way to get the info you want
<9> that particular theme has: <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>
<8> CryWolf: I installed build-essential and then ran "pear install tidy"
<9> in it which causes the problem apparent. I also need to get rid of the sidebar getting the function applied to it.
<8> I then enabled the extension in the php.ini file for apache2, and it's all deluxe :)
<8> thanks for your help CryWolf
<3> tama00: what is a data structure
<4> why do people put "the_" at the beginning of variable and function names? A waste of four characters.
<5> flaccid, http://en.wikipedia.org/wiki/Data_structure
<9> heh I didn't write it.
<9> it's built into wordpress.
<5> flaccid, they include such things as arrays, records, unions and refernces
<4> philovirus: wordpress people can probably help you accomplish what you want to do
<3> so which data structure are you talking about
<5> flaccid, records
<9> I've been asking in the wp channel for 3 hours.
<5> flaccid, aka structures
<9> I just need to figure out the syntax for an if else
<4> philovirus: what are the exact conditions?
<3> so you are talking about database records?
<9> cry: what do you mean exactly?
<4> philovirus: you want to write an if statement. What are the exact conditions for that if statement?
<5> philovirus, if(expression) { statement }
<9> I know how to write it I'm just not sure what to write.
<4> philovirus: can't help you with that. sounds like it requires knowledge of wordpress.
<5> learn logic my friend;)
<11> if (you knew what to write) {you'd write it}
<9> in the case on my test site, part of the issue is that theme writing the_title twice, I need to close the initial one before the 2nd one and then I also need to make it strip the function completely if the_title appears in a div called #sidebar
<5> Rewt`, lol
<9> rewt: lol
<3> tama00: so what do you wanna do with the database records in php
<4> philovirus: use css to hide stuff
<4> actually, no, that won't work
<4> p*** an additional parameter to the_title() so you know whether or not to include the extra info
<9> er waitasec.. I can hide it with css since the function adds a cl***, I just need to set that cl*** to hidden
<5> flaccid, i wanted to make know if php supports records aka structures..
<9> can you give me an example parameter?
<5> flaccid, not a record in a database
<4> you can hide visible stuff with css, you can't hide anchors
<4> tama00: php supports arrays and objects
<3> i can't find a data structure called 'records' or 'structures'
<5> CryWolf, yeah cause i noticed that arrays in php can have more then one datatype..=\ so i was wondering if they scraped the idea of a record because of that
<9> well by anchor I meant: <a href="#">img</a> not a true anchor. Sorry I misspoke
<4> tama00: what is a record, exactly, that it isn't an array?
<9> the empty link just allows the moo.fx to function
<12> nyone know how to specify set an attribute and a cdata block at the same time in PEAR::XML_Serializer?
<3> i cant find any definition of record
<5> they are a data structure used in most programming languages
<5> i just happen to know other programming lanuages other then php
<4> tama00: but you can't define it
<3> show me an example of record
<5> CryWolf, i just did, a record is a data structure contain more then on data type
<3> well i know that data structure as an array
<5> ok
<4> I don't think that has any relevance in a weakly-typed language
<3> what language uses record?
<4> RPG, probably


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

ubuntu dpkg was interrupted dpkg --configure -a
mysql subquery where in doesn't use index
#dns
eterm hit a key to exit
debian x1600 xorg no screens found
#css
mda plugins
#suse
kunbuntu GRUB
MysqlCDR



Home  |  disclaimer  |  contact  |  submit quotes