| |
| |
| |
|
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 28 29 30 31 32 33 34 35 36
Comments:
<0> same as if ($result == NULL) <1> Elazar: thanks, I'll check it out <2> ^Migs^, ok sweet thanks :) <3> ^Migs^: is it? or is it the same as if ($result == false) or both <4> ^Migs^: uhm, *SO* wrong <0> $result = mysql_query ($query) <4> !$var == $var == false <5> easiest way to see if an array has 0 or 1+ entries <0> heh <3> false !== NULL <0> you're right. Don't pay attention to me, Bruce_LeeRoy <3> although most api queries generate false on an empty result set or if results fail <3> thus your concept works if(!$result) { <no results> } <4> to me more specific, !$var == ($var == false) == NULL !== NULL <2> lol so which one is it? <6> hello, I'm having some problems with serializing objects and then p***ing them as shell arguments. When I serialize something it puts a blank bit in it (0x00) and then when I run escapeshellarg() on the string it cuts off everything after the blank bit. Does anyone know why this is happening, or any ways around it?
<3> Bruce_LeeRoy: !$var is the same as saying $var == false <0> just make it happen, Bruce_LeeRoy <2> if ($result == NULL) { <3> Bruce_LeeRoy: a returned empty result set is a false result set, not a null result set <2> aww <7> I'm playing with it now bln0ry, let me see if I can get it to work. <8> Bruce_LeeRoy when the result is valid for you? <3> Bruce_LeeRoy: thus, if you want to do something if the result set is empty, you can do if(!$result) { <do whatever because $result is empty> } <2> sweet, thanks :) <9> empty? <2> very helpful bunch of guys :) <3> philip: using the term loosely <9> that checks if the query failed, not if no rows exist <0> if I have include a file, and that file has other includes with relative links, are the links relative to the original file, or the included file? <3> philip: it works, i've used it in while loops and it will break on 0 rows by returing a false. <9> well i just got here so could very well be missing something, but Bruce_LeeRoy used the term so i wonder if he is confused <4> ^Migs^: HTML links? To the output ;) <10> how do I do a times wedpage forwarding? <10> *webpage <10> err. <8> Migs by experimenting you find out <10> *timed <9> b1n0ry, i don't believe it <4> Anil: JavaScript or Meta Refresh. <3> philip: i think he's got it and i think that continuing the discussion will *make* him confused. <9> either a result, or false <0> or you could just answer <9> result is a result <0> you know, take the useful route <8> put a file in certain folder then work on the combation of includes and see what happens <9> this is why we use mysql_num_rows <3> ...or any number of fetch statements <6> hmm, does serialize() support create_function()'s? <0> screw this. I'm just putting everything in one directory <3> as fetch statements return false after returning all rows (also if result set is empty) <3> ...when there are no (more) rows to fetch would have been a better description, i suppose <9> hmm, this doesn't seem right, will have to test :) <8> i personnally use the $_SERVER['DOCUMENT_ROOT']."/path_to_file'; so where ever you put it it is valid <3> philip: what doesn't seem right? about fetch returning false on no results to fetch? <9> in theory includes should be outside of document root :) <9> b1n0ry, about zero rows <4> philip: SELECT 1 WHERE 1=2; mysql_fetch_***oc() first call returns false <4> not the mysql_query() call <11> This is probably a pretty easy question, but can I've got all these ^M chars in a file (because it was uploaded in binary)... Can i strip these out with PHP before reading the file with file()? <9> Davey, he is saying, if no rows exist, if (!$result) will be true <4> tmorton: they are windows EOLs <11> Davey: yeah, I know <4> philip: no, he switched to talking about *_fetch :) <9> oh lol <11> Davey: It came from a Mac, interestingly enough :P <3> philip: $result = mysql_query("SELECT * FROM TABLE"); while($row = mysql_fetch_array($result)) { echo $row[0]; } <-- with no results, the while loop never enters. <11> The upshot of it is that file() is reading the lines with ^M into the same array item <4> tmorton: to me more specific, they are the \r, so either windows or mac <12> ignore me <11> e.g.,[1] => If Anything is a RambleFest, This Is. <11> Come Soak in the Randomness! <9> don't use the word empty and all will be fine :) <2> philip, its not working... with the false thing... <7> hey b1n0ry, I copied that exmaple you posted on to my server... its just displays a white box with word *Display in it right? Nothing else?
<11> But those should be two items, not one <2> philip I want to say something if it returns 0 rows <3> philip: i got confused earlier with a different discussion with Bruce_LeeRoy, then i corrected myself and after your comment started talking about fetch. <9> Bruce_LeeRoy, because, well, because... <9> Bruce_LeeRoy, use mysql_num_rows <3> Bruce_LeeRoy: $result = mysql_query($sql); if(mysql_num_rows($result) == 0) { do somethign } <9> Bruce_LeeRoy, it being false means the query failed, nothing to do with what is in it <3> s/somethign/something <9> if (!$result) is still a good check before that <13> im using imagemagick... for an image that is 1000px by 702px .. and 90.714 inches by 63.681 inches @ 11.024 pixels per inch (http://www.celebrityautographs.com/images/guitars/output/1874c.jpg)... i want to make it optimized for the web.. i don't really understand how this works <2> ok <9> to be sure the query ran <3> ironpig: actually, on my server i get a nice little command button that says "Display alert box" <9> Bruce_LeeRoy, php.net/mysql-fetch-***oc has a perfect example for you <9> PERFECT! <14> yes yes, i know, sorry, try !Tell bet0x how solve the problem <7> um. yah its not doing that... <14> I have a error related to http://bugs.php.net/bug.php?id=35029 , but i have PHP 4.4.2 and Apache 1.3.34 ( segmentation faults with multiple include virtual requests ), i tried upgrade, remove, re install, and nothing solve the problem, i got this too: signal Segmentation fault (11). Thanks in advance. <7> am I missing something, maybe somethings not installed on the server? <15> (($row = mysql_fetch_row($result)) !== false) <2> philip ok that worked, thank you b1n0ry <9> it worked, but will fail one day with an ugly error, when the query fails <9> multiple ugly errors :) <2> hehe <2> so i should have a result if the query flat out fails as well? <3> ironpig: i don't know. i have no problems copied the code exactly. <9> you should check out the example i referred to <2> ok <16> Hey does anyone here use QuickForm? <15> I do... <16> I'm trying to figure out how to put First [Box] Middle [Box] Last [Box] on one line <16> I got it to put [Box] [Box] [Box] but I can't get the text in there <15> it makes me cry... and then happy... and then cry again <3> ironpig: did you copy and paste or did you hand copy? <17> inono: Boxes don't have labels? <3> ironpig: i copied and pasted. (remember there are two separate files there) and have no problems at all. <16> http://pastebin.com/595117 <15> that's what he's sayin <7> let me show you... <3> ironpig: if you have it on a public server, send me the link. <16> Here's the HTML it outputs, http://pastebin.com/595119 <16> I need it to say First, Middle, Last, next to each form field <16> There's gotta be a way right, having boxes next to each other w/o explanations is pretty useless <17> Is 'html' a valid element type for quickform? <15> inono: hmm, groups are funky <16> yeah but that would put html at the top of the table, uselses <16> useless* <17> inono: The docs say the html type is deprecated. Maybe 'static' would work better. <16> static doesnt work <5> any recommended server benchmark apps? <16> it doesnt output anything when I use createELement <15> JMeter <15> myconid: JMeter <5> was just downloading that :) <16> $name[] = &HTML_QuickForm::createElement('static',"Label", "Text"); <16> does nothing <16> $form->addElement('static',"Label", "Text"); works but puts a label on a separate linoe <15> myconid: it takes a minute to get used to, but is pretty nice <15> it's give an take with QF <15> is there a way to suppress join/quit messages? <17> Most clients have a way, yse. <17> *yes <3> benlake: that would depend on your client <15> anyone use irssi? <16> How do I put an explanation under a text field? P***ing in an array to the 3rd argument doesn't seem to be working <18> how can I check if a string can be found in the keys of an array? <19> hello <15> marccd: array_key_exists <16> Am I using a bad version? :( <18> benlake: thanks <19> how would I go about creating a self extracting PHP file for PHP 4? my host does not have working FTP support <15> self extracting? <19> yes <19> I was thinking maybe base 64 encoding a tar file
Return to
#php or Go to some related
logs:
+css+deadcenter quakenet regitering mediawiki Call to undefined function: session_name() #php CRYSTALBALLS.COM sshfs reliable update orinoco 0.15rc4 #openzaurus #osdev domain whoises
|
|