| |
| |
| |
|
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
Comments:
<0> zezom: then just hold the last row in an array <0> zezom: at all costs I would avoid doing a data seek, it is easy enough to hold the last record in an array <1> zircu, I was hoping to cut down on the memory copying to speed things up a bit <2> data_seek ftw <0> zezom: you wiill have to hold the next record while you seek that last record to do the compare, right? <3> how can i dump php variables to javascript? <3> var_export? <1> zircu, I will have to hold the very last record and the remaining previous record... I am culling records out onthe first p*** <4> zezom: This is generally the sort of thing I make my database do for me before I ever see the results <1> zircu, if I hold the current row in an array for every line it will slow my function down a bit... and a bit * over 6000 records adds up to a lot <5> winmutt: how about 'echo'? <1> TML, I looked into that but apparently for my server I don't have enough grunt <6> winmutt: <?php $foo = "bar"; ?><script language="javascript">foo = '<?php echo $foo; ?>';</script> ? <3> what about complex data <3> var_export wont work? <5> define 'complex'
<3> !objects <3> !string <7> winmutt: did you read what var_export does? <6> winmutt: Read what var_export does <6> O_o <0> Dangermouse: ***uming $foo doesn't have a ' or line breaks <6> zircu: Was a simple example :P <5> winmutt: PHP has absolutely nothing to do with JS... It's handling of variables and objects are completely different. <8> $howhurt = sizeof($bullet); :P <0> Dangermouse: understood <7> winmutt: and php and js don't have any special linking. you can echo js code from php and that's about it. <5> ||cw: *nod* <4> There are a number of projects out there that parse json strings into PHP structures <7> as relates to ajax? <3> one would think that php would have a function to dump arrays and what not to js.. but ok <9> So many that it's almost as if PHP people aren't very good at reusing code. <10> winmutt: why would you think that? <3> ive only been complining about it for years <7> but even then, it's not magic <3> well if perl has a module then php sould have it built in :) <10> winmutt: i have a file that doesnt i <7> winmutt: it's not that hard to make one. that's why it's not built in <10> does it* <11> winmutt- there is, it's called echo <5> winmutt: er... <0> winmutt: there could be.. dump_string_to_<filloutputformathere>() <6> winmutt: Newsflash: php != perl <7> just like there's nothing built in to output a table row <11> I believe PHP6 will have a native JSON extension <3> ya ya ill just use serialize and write a js funct to unsreialize <12> I still don't understand why this is an infinite loop. Why if I call mysql_fetch_row inside of a cl*** that when I return the result in a while loop it just returns the first record in a loop? <13> hello, i have no previous knowlege in php, but i keep getting a warning Warning: implode(): Bad arguments. in /XXXX/xxx.php on line 46 , the line is print implode("",$array); does it look faulty? it used to be join() , but according to http://www.php.net/join its an alias , so i altered it, and i used to get the same error ... any ideas? <3> Dangermouse: newsflash php is a scripting language for developing dynamic content <10> winmut: if you listen, i have one to do it <4> winmutt: dumping arrays to JS? Why would I want such a thing as a builtin, given that in 7+ years of writing PHP, I've only wanted to do such a thing once? <7> winmutt: yes, which has nothing to do with html or javascript <4> ***imilate: Because everytime you call mysql_query(), it runs the query and returns a NEW result set <4> ***imilate: So each time through the loop, you're back on the first tuple in your result set <7> php is just as effective with WAp or xml or xslt or rss or cvs or binary image generation <12> TML, I call the query once. <3> if there is so much html specific functionality one would think it would be logical to add some js specific functionality <4> ***imilate: You're mistaken. <4> ***imilate: pastebin the code <4> winmutt: "html specific functionality"? All of...what, 4 functions? <3> TML: thats 4 more than js gets :0 <3> haters! all of you :) <12> http://pastebin.com/652079 <4> winmutt: And 4 more than PHP probably should have <7> most of which can also be used for xml <4> ***imilate: Where's the code that has the loop? <4> This code never loops <12> http://pastebin.com/652083 <3> im just making a point that if perl has a module for something cgi related then perl should probably have some duplicity thats all.... i mean the whole reason i use php is because its faster to develop in than perl <4> winmutt: Unlike you, most PHP users don't *WANT* PHP to be perl <5> XD <3> itrebal : thanks man, im just going to make an unserialize <4> If perl has it and PHP doesn't, that's grand! <14> zircu, yeah, it's some pretty bad code <7> winmutt: a module is 3rd party, not PART of perl. i'm sure there's a module in pear for it. <3> i think everyone is missing the point here <3> there is no pear mod for it
<3> and pear ****s <10> i like how i gave winmutt a perfectly good solution for it, but is going to use a slower method <7> then there's some other 3rd party module <5> winmutt: In the end of the ends -- You could always write a PEAR or PECL module for it. <9> Stormchaser: It's more fun to complain. <4> ***imilate: So, this does while($row=$cl***->resultRow) <0> winmutt: pear != Perl modules <5> mattmcc: :) <4> ***imilate: That's always going to be true <12> TML, yeah, which should just return the resultRow <4> ***imilate: No matter how many times you examine $cl***->resultRow, it contains the exact same value. <3> who do people think im stupid of course pear!=perl, perl > pear <4> $this->resultRow=mysql_fetch_row($result); <10> winmutt: then... use perl? <6> LOL <8> Saw that coming a mile away. :P <6> "Of course pear cant be compared to perl....perl is better than pear" <7> um, it's it generaly a bad idea to call all the fetch function on the same result? <15> winmutt: NOW you know what ppl think your stupid... you open your mouth. <4> ||cw: What? No. <10> Stormchaser: thats gross <4> Jymmm: Was that even English? <8> Heh... "It is better to be silent and have others think you a fool than to open your mouth and remove all doubt." :P <5> itrebal: PYthon, you dork. :P <4> Elazar: Good old Clemens <6> Elazar: lol too true <10> Stormchaser: haha <16> i see i came in during a convorsation <8> TML: Clemens? <16> but can anybody help me? <4> Elazar: Samuel Clemens <8> TML: I'm ***uming you're referring to the author of the quote. I actually didn't know who to attribute it to. <6> Samuel Clemens <17> TML: I think that Jymmm was trying to converse with winmutt in his native toungue. <4> Elazar: Now you do. :) <5> QuickTim: how about asking the question first? <8> Ah, OK. Figures it would be him. :P <18> im having a problem properly listing numbers from a column through mysql in descending oder <18> $query = "SELECT * FROM scriptinfo ORDER BY downloads DESC LIMIT 10"; <7> TML: so this doesn't scream "ow pain" to you? : $this->resultRow=mysql_fetch_row($result); $this->resultArray=mysql_fetch_array($result); <18> that's whati have but it's not starting at the highest number <12> TML, So what I have p***ed into $this->resultRow is a single value? <11> Wow, there's an effective ban evasion attempt <0> QuickTim: can't help if we dont know the question <16> stormchaser im using a php example from api.urbandictionary and it put an array inside of an array, is there away to get $soap['definition'] from $result[0]? <4> ||cw: No. He gets two different results into two different variables... <5> Dragnslcr: I am perfectly aware of it. <4> ***imilate: Yes. <18> anyone know? <19> TML: ok, I have the instantclient files setup, and I added the directory to the windows PATH in environment variables, but it still says the function doesn't exist <10> Davey|Work: i was just about to recommend that <12> TML, Ok I guess I cannot run those functions inside the cl***. <14> mattmcc, i found the ban: *!*@*tor/* matches the contributor in my hostmask <5> Davey|Work: okay... That works too ;) <4> hah! <4> allanw: Nice <7> TML: right, but they are seperate rows. i think isn't what is intended, and I thought I saw somewhere a comment says "don't use fetch_x with fetch_y" <18> im having a problem properly listing numbers from a column through mysql in descending oder <4> allanw: I saw that, and thought "Tor?" <18> $query = "SELECT * FROM scriptinfo ORDER BY downloads DESC LIMIT 10"; is whati have <18> but it's not starting at the highest number <18> can anyone help me get it to work right? <16> erm <16> you sure? <16> its hould <18> yeah <18> the highest number is 210 <18> it's starting atr 95 <18> i've been stuck all day <16> take off the limit <4> phos: Is the field a number or a text? <16> see what you get <7> phos: is downlaods field a int?
Return to
#php or Go to some related
logs:
symbol dav_hook_gather_propsets: error: C compiler cannot create executables +ubuntu lucidasans debian NV-Support+script #gentoo no module named xmmsclient xlib-static #perl mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' #fedora
|
|