RE: [PHP-DB] Re: Basic MySQL Query Question

From: Date: Mon, 16 Aug 2004 14:51:43 +0000
Subject: RE: [PHP-DB] Re: Basic MySQL Query Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-193943@lists.php.net to get a copy of this message
> [reply] > Please try if those changes solve your problem. Whenever one of > your values > will contain a single quote you will get an SQL error - so use > addslashes() > or (better) mysql_real_escape_string() on all insert values. > [/reply] > > > That is my whole point though, is that it does not happen every > time. I get > no error when the user registers (inserting "O'Neal" into the table), but > when I insert the same name into the tickets table, it fails. Chad, please always answer to the list. Echo out your queries and compare them, there must be a difference. Regards, Torsten

« previous php.general (#193943) next »