@# 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 28



Comments:

<0> robcole: ummm... use mysql_insert_id()
<1> when i put mysql_insert_id(); after the insert i get a more null result
<1> it doesnt pick up from the first insert but when i use printf("Last inserted record has id %d\n", mysql_insert_id()); for debugging uses it does pick up the userid of the first insert
<2> robcole: mysql_inser_id() requires auto increment field. Uniq ID.
<1> the first its taking from is auto incremented
<3> robcole: what line did you put that one
<0> what stormchaser said
<4> robcole: are you inserting multiple rows?
<1> employer_id int(10) NOT NULL auto_increment,
<1> no not mutiple rows
<4> (in one statement...)
<1> yes
<3> Stormchaser, nater: he';s been calling mysql_inser_id before the first mysql_query...
<2> robcole: Pastebinn what you have, please
<5> is this line any problem ? $visitas =mysql_num_rows(mysql_query("select distinct sid from visitas"));
<2> ||cw: I got a feeling, but I was affraid to ask.



<4> yes, it's uneffective as hell.
<6> I'm having trouble trying to code a XML reader/parser for PHP 4.4.1 can anyone help me, give me a link to a tutorial or something?
<7> how would I go about creating a userland php alternative to runkit_lint() without exec() and co?
<8> hi can someone tell me why http://ctfmix.org/~chris/dexterity.php the top of it is messing up where on every other page eg., http://ctfmix.org/~chris/index.php it is fine???
<6> I would like something like simpleXML - but that's PHP5 only
<0> i should attempt a php fps... it'd be an interesting experiment
<2> AlexC_: Try xmlreader from PEAR.
<9> prophile: Some dedication and php.net/tokenizer
<9> Oh and a great familiarity with the syntax rules.
<6> Stormchaser, and that will work with PHP 4.4.1?
<3> cmm3_: look like a layout issue, ask in #web
<7> woo, that'll take a nice long time
<2> AlexC_: I know the answer, but TIAS and RTFM.
<1> storm and cw thats my new code http://pastebin.com/659878
<10> ||cw allright, i got dependency walker to not report any erros finding other dll's. Unfortunately the server is producing the same error. Event viewer sheds no light on the cause of the problem. do you know of any other things i can try?
<3> sero|work: other than I've never made php+iis work the way like, no
<11> ||cw: the echo statement returns a value of 0
<10> im so frustrated at the lack of documentation on getting this to work which makes me belive its gotta be super simple (which it woudl seem that it is)
<3> brandon_: where was the echo
<10> thanks a lot for your time though
<10> i do appreciate the help :)
<12> anothoer cimputer program who cant program lol
<11> ||cw: i put it right after $randFileName = array_rand($dirContents);
<3> brandon_: also keep in mind that array_rand() returns a random key, not a value. $randFileName = $dirContents[array_rand($dirContents)]; is probably what you want
<3> brandon_: also print_r($dirContents) to make sure it has stuff in it
<6> Stormchaser, Is this it? http://pecl.php.net/package/xmlReader - i've found a few called XMLReader and they all seem to be different
<11> ||cw: i tried that one, and it returned keys with no values
<3> then you loop isn't working :/
<13> i need to clean me room
<11> figures
<3> brandon_: echo in the loop
<12> AlexC_: go back to asp
<6> therock, guh?
<11> ||cw: ok, i echoed $file in the loop,a nd it returns file names as expected
<13> i wish i could forward the time javascript thinks it is :/
<1> Stormwatch you there?
<1> Stormhaser sorry
<13> heh
<3> itrebal: try changing you clock
<3> brandon_: what about strcasecmp( substr( $file, -3 ), 'jpg')
<11> ||cw: well, that just makes sure it's only looking for jpg files, since there are other files in that directory
<14> how can I write a string (len > $500) to a file without writing the end of line, CRLF, character?
<3> brandon_: and i think that's it, you want to test that for == 0
<3> brandon_: 0 == false so it's failing
<13> however, 0 !== false
<11> ||cw: wait, you've lost me. slow down
<3> prime reason I just strtotlower then compait normal like
<3> brandon_: read php.net/strcasecmp
<15> how could I resize a image with gd imagecreatetruecolor
<16> robcole: why are you not doing mysql_query($sql) in your code
<3> when they are equal, it reutns 0, and 0 == false, so your if is only true when the file extention is "greater than" jpg
<15> <3> is it for me the explanation ?
<3> ace_me: php.net/image and search for resize
<17> im trying to get sessions working without cookies. I have set session.use_trans_sid 1 and session.use_cookies_only 0 via apache configuration but I still cant get php to write the SID to the url
<15> I know to use imagecopyresized but the pallete is not good
<18> Bugger! I can't save a microtime() value in an XML attribute. Any suggestions?
<19> shad__: A link to your server so we can examine the problem?
<13> Jemt: and why not?
<18> itrebal: Dunno. May be because of the '.' ?!
<20> if i get this error:
<20> Error on line 13 of Query:



<20> Duplicate column name 'id'
<20> should i talk to mysql chan ?
<20> ;)
<18> Gaa, never mind!
<18> I should eat. Would help me alot..
<21> Alija_: yes ?
<21> probably...
<20> because i am trying to install a chess game...it says to run install.sql .. thats what i did...with all followed instructions
<20> and now it tells me:
<20> Error on line 13 of Query:
<19> Alija_: ##PHP doesn't support MySQL, nor your chess game
<20> Duplicate column name 'id' ..
<20> ok
<20> thanks
<13> lol, someone put mothballs in their gas tank to increase the octane
<22> hello there
<19> itrebal: Are they a candidate for the darwin award, or just honorable mention?
<22> how are things here then
<13> TML: lol it apparently used to work in the 60s
<23> Shame I can't just publish it, this is really scary stuff.
<13> mattmcc: ?
<13> sample :) ?
<24> mattmcc: Isn't that the bulk of all php code?
<25> Can anyone help with this qu? I've tried to put as much info / code on here to help as possible: http://pastebin.com/659916
<25> thanks if you can :)
<11> ||cw: thank you. it works now. the test statement wasn't complete, i only had to add ==0
<17> TML what would be helpful to see?
<23> Here's one that I didn't know even did anything:
<3> itrebal: still does work, but not with just any moth ball http://www.newton.dep.anl.gov/askasci/chem00/chem00485.htm
<23> if ($ddeposit_not_valid) { next; }
<23> Then I did a quick test, and realized that it doesn't actually do anything.
<23> I thought it might be an alias for continue, but it's not.
<13> ||cw: thats neat
<3> wee! http://www.engadget.com/2006/04/14/apple-legal-sends-little-girl-running-crying-to-room/
<13> however, by increasing your octane to anything htat your engine isn't designed for, will result in carbon buildup
<14> how do I strip a string of eol characters? ie. CR/LF?
<3> Apple makes little girls cry
<3> especialy iPods
<3> gamengineer: str_replace
<2> gamengineer: trim() or str_replace?
<19> shad__: A URL to your server
<14> nm, trim, thanks
<13> ||cw: quality, i cant wait for them to implement i
<13> t
<3> Teach: you'll probably have to do it 3 times, one for eahc line. could a a GD thing and not so much php
<25> Ah ok
<3> Teach: or maybe it want \r\n
<26> cw: did you see #17 on there
<25> Same for that too :( Could I use $text1 = "Foo"; $text2 = "Foo"; $text3 = "Foo"; and then imagestring($img, 3, 95, 28, $text1 $text2 text3, $textcolor); ?
<17> TML heres a test. http://www.godlysteward.com/member/session.php (both session.phps and sessionTest.phps are available)
<27> ?
<25> ||cw nope can't use that :( I get an error for imagestring($img, 3, 95, 28, $text1 $text2 text3, $textcolor);
<28> it would be nice if PHP would take named function arguments
<28> in a long list of optional arguments you could just p*** the one you need, func(var='just_this');
<7> why isn't @ suppressing errors with set_error_handler()?
<23> eleftherios: Yes, that would be nice, like python.
<7> eleftherios: just use one parameter as an ***ociative array
<23> prophile: Not the same. :) And then you're having to say func(Array(foo)) all the time.
<25> ||cw Got it! I'm using : imagestring($img, 3, 95, 44, $text1, $textcolor); imagestring($img, 3, 95, 55, $text2, $textcolor); imagestring($img, 3, 95, 64, $text3, $textcolor); -- works good, but obviously it's wasting because it's calling $img it's doing the imagecreatefrompng function again, for the text2/text3, how can I stop that (replace $img with something false)?
<7> heh
<29> I'm trying to use 'setcookie' with php5+apache2, and I'm getting 'Warning: Cannot modify header information - headers already sent', but no file that they were sent in
<30> hey
<30> if I have do:
<30> (in a cl***) :
<30> protected $cl***es = array();
<30> then I do: $this.cl***es[] = array('name' => $name , 'type' = $type, 'location' = $location, 'start' = $start, 'end' = $end);
<31> crashev, stop sending info before setting a cookie
<30> what foreach statement should I use to loop each added 'cl***'?
<31> that could include a rouge enter before the <?php tag
<32> Does anybody know of a (good?) PHP(5) profiler?
<29> Seadog: I've already looked for that, and I'm not seeing that -- in that case, the error message contains what file sent the headers
<29> Seadog: I'm seeing something like:
<29> Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent in /home/crschmidt/trunk/include/session/SessionHandler.php on line 259


Name:

Comments:

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






Return to #php
or
Go to some related logs:

aiglx 200m
dhclient3 sniffer
#suse
#web
#perl
geoip iptables
#suse
#mysql
install network-admin ubuntu
PERL_UTF_LOCALE



Home  |  disclaimer  |  contact  |  submit quotes