Magic quotes replaces the ' with '' so that when you execute an SQL query, it is encoded properly.
Or else someone could put a single quote in a form field and screw up your database. I do not like magic quote myself. But we're going OT. Echo the UPDATE query itself and then copy/paste it here that way we'll see what is wrong. Maybe the $id variable is not replaced with the proper content. -----Original Message----- From: Tom Lobato [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 2:31 PM To: mysql@lists.mysql.com Subject: Re: WHERE doesn't work >From: "Nicolas Verhaeghe" <[EMAIL PROTECTED]> >Ok but what is the problem then? WHERE doesn't work. Iwrite WHERE in the command for UPDATE exactily one record, defined by id = $id, and mysql server UPDATE all the records in the table. >Also are you taking care of converting the single quotes or do you have >magic quotes set to on? What do you mean with "converting the single quotes"? I dont know what is magic quotes, but, from phinfo.php: magic quotes gpc on on magic quotes runtime off off magic quotes sybase off off Tom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]