Re: HELP!!!

From: Date: Sun, 26 Aug 2001 22:24:52 +0000
Subject: Re: HELP!!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64553@lists.php.net to get a copy of this message
You must have changed something else as well... You still should add some error-checking. If $ins_u is FALSE, then the INSERT failed, and you ought to do something about it... -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: BRACK <brak@nettaxi.com> To: Richard Lynch <ceo@l-i-e.com> Cc: <php-general@lists.php.net> Sent: Saturday, August 25, 2001 3:22 AM Subject: Re: HELP!!! > I'm not sure if it's right solution but I did this - > > $ins_u = mysql_query("INSERT INTO users (name,email) > VALUES ('$u_name','$u_email')"); > $userid = mysql_insert_id(); > > instead for this - > > $ins_u = @mysql_query("INSERT INTO users (name,email) > VALUES ('$u_name','$u_email')"); > $userid = @mysql_insert_id($ins_u); > > And it works perfectly > > Youri > On 24 Aug 2001, at 20:51, Richard Lynch wrote: > > > Your mysql_connect is wrong. > > > > Stop using just @ to suppress errors, and start doing something useful with > > http://php.net/mysql_error like sending it to > >http://php.net/error_log or > > something. > > > > -- > > WARNING richard@zend.com address is an endangered species -- Use > > ceo@l-i-e.com > > Wanna help me out? Like Music? Buy a CD: &¢q%3 > > …ôÃÒ0rÖhttp://l-i-e.com/artists.htm > > Volunteer a little time: > > http://chatmusic.com/volunteer.htm > > ----- Original Message ----- > > From: Brack <brak@nettaxi.com> > > Newsgroups: php.general > > To: <php-general@lists.php.net> > > Sent: Friday, August 24, 2001 3:25 PM > > Subject: HELP!!! > > > > > > > I have a script with combination: > > > $ins_u = @mysql_query("INSERT INTO users (name,email) > > > VALUES ('$u_name','$u_email')"); > > > > $userid = @mysql_insert_id($ins_u); > > > > > > > It's working fine on local server but now I put it on the web and it > > > sais: > > > Warning: Supplied argument is not a valid MySQL-Link resource in > > > /home/sites/site21/web/incr/submition.inc on line 30 > > > > (which is line above) > > > Youri > > > > > >

« previous php.general (#64553) next »