Page 1 of 1

Replace Error

Posted: Wed Sep 25, 2002 11:02 pm
by Zoram
Ok, Here is my code...

Code: Select all

REPLACE INTO `Articles` (`article_num`, `state`, `area`, `name`, `author`, `issue`, `desc`, `article`) VALUES (`". $_POSTї'id'] ."`, '$state', '$area', '$name', '$author', '$issue', '$desc', '$article');
How do i make it replace the row? if i take off the `article_num` and (`". $_POST['id'] ."` then it makes a new one but how do i replace it so that it replaces the old one?

Posted: Thu Sep 26, 2002 1:09 am
by Takuma
Try

Code: Select all

REPLACE INTO Articles VALUES ('', '{$_POSTї'id']}', '$state', '$area', '$name', '$author', '$issue', '$desc', '$article');

Posted: Thu Sep 26, 2002 11:39 am
by Zoram
That didn't quite work, but when i took out the empty ' ', at the first it worked fine.

Thanks!