Impossible! Where is the error?! (UPDATE categories SET...)
Posted: Mon Jul 22, 2002 6:13 pm
Hi,
I have a class to manipulate MySQL functions, one of these functions is:
My question is why the fallowing is not working?!
Where is the error
The code above (INSERT...) works!
That's why i am angry
Thank you.
I have a class to manipulate MySQL functions, one of these functions is:
Code: Select all
function query ($query)
$this->result = @mysql_query ($query, $this->link)
or die ("Error: mysql_query.");
return $this->result;
}Code: Select all
$DB->query ("UPDATE categories SET
pid = '$pid',
ctitle = '" . addslashes ($ctitle) . "',
cdescription = '" . addslashes ($cdescription) . "',
cphoto = '" . addslashes ($cphoto) . "'
WHERE cid = '$cid'");Code: Select all
$DB->query ("INSERT INTO categories (cid, pid, ctitle, cdescription, cphoto) VALUES
(NULL, $pid, '" . addslashes ($ctitle) . "', '" . addslashes ($cdescription) . "', '" . addslashes ($cphoto) . "')");That's why i am angry
Thank you.