[PHP] strange beahaviour with a mysql query in php

2002-07-16 Thread David D
Hello, I ve got mysql 4.0.1 I don't understand what happen. I use to make replace other than insert in order to avoid error in php scripts. I have a table with on primary key : CREATE TABLE `nlconfig` ( `id` tinyint(4) NOT NULL auto_increment, `nomnews` varchar(255) NOT NULL default '',

Re: [PHP] strange beahaviour with a mysql query in php

2002-07-16 Thread Martin Clifford
If you only want to update the row if it exists, then you need to use a WHERE clause to make sure it does exist. Blah blah blah WHERE row_id='$id' LIMIT 1 might work. I'm lazy and didn't want to retype what you had. :o) Martin Clifford Homepage: http://www.completesource.net Developer's