0

whats wrong with this code?

i'm really confused!

when i use INSERT code insted of UPDATE in my file, every thing is ok. but when i use UPDATE,it doesn't

work!!

UPDATE:

$query = "UPDATE $tblname SET title='$title', desc='$desc',  body='$body', time='$time', faday='$faday', famonth='$famonth', fayear='$fayear', fu_show='$fu_show', fu_day='$fu_day', fu_month='$fu_month', fu_year='$fu_year', wshow='$wshow', dshow='$dshow' WHERE id=$id";

INSERT:

HTML Code:

$query = "INSERT into $tblname values '0', '$title', '$desc', '$body', '$time', '$faday', '$famonth', '$fayear', '$fu_show', '$fu_day', '$fu_month', '$fu_year', '$wshow', '$dshow')" or die(mysql_error());
3
Contributors
3
Replies
4
Views
11 Years
Discussion Span
Last Post by william_stam
0

Hello,

Check your grant tables to see if you have the update permission.

Christian

thanks for your hint
i use EasyPHP 1.6.0.0

i did it
i checked grant tables
i activated it for All actions, all DBs
but still have problem!

0
UPDATE `adds` SET `client` = 'client1',`TOTALCOST` = 'totalcost' WHERE `ID` =9710
INSERT INTO `adds` ( `ID` , `client` , `colour`) 
VALUES (
NULL , 'sda', 'ads');

try like that

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.