For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2007 > Saving 0 instead of empty string, MySQL









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Saving 0 instead of empty string, MySQL
edA-qa mort-ora-y

2007-07-11, 7:02 pm

I have a problem where the string 0 is being saved to my database rather
than the empty string which I am requesting.

The code looks like:

$es = $db->prepare( "UPDATE fs_fortress SET Player=?, End=?, Points=?
WHERE ID=?" );
$res = $db->execute( $es, array( $player, mysql_datestr( time() ),
$points, $id ) );

Where $player is always of string type and works as long as it is
non-empty. As soon as $player is an empty string, 0 gets stored.

How do I fix this?

--
edA-qa mort-ora-y
Idea Architect
http://disemia.com/

Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.


Huneybuns

2007-07-13, 7:12 pm

Helen Hunt and Catherine Z. Jones Lick Pussies On Sofa!
http://www.freedutchmovies.com/WatchTube?vid=148803


funny video clip site 3gp clip funny video hot sexy funny video free download video sexy funny clip funny site video
http://635-funny-video.info/funny-m...ruto-video.html http://635-funny-video.info/clip-funny-site-video.html http://635-funny-video.info/funny-home-video.html http://635-funny-video.info/free-fu...pace-video.html http://635-funny-video.info/funny-naruto-video.html
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com