DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   MySQL (http://www.daniweb.com/forums/forum126.html)
-   -   help!! update mysql problem (http://www.daniweb.com/forums/thread37747.html)

mehrzadsoft Jan 8th, 2006 4:39 pm
help!! update mysql problem
 
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());

kc0arf Jan 9th, 2006 2:46 pm
Re: help!! update mysql problem
 
Hello,

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

http://dev.mysql.com/doc/refman/5.0/...ing-users.html

This could be the source of your problem... you might not have the UPDATE permission.

Christian

mehrzadsoft Jan 9th, 2006 3:11 pm
Re: help!! update mysql problem
 
Quote:

Originally Posted by kc0arf
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!

william_stam Jan 15th, 2006 7:39 pm
Re: help!! update mysql problem
 
 UPDATE `adds` SET `client` = 'client1',`TOTALCOST` = 'totalcost' WHERE `ID` =9710

INSERT INTO `adds` ( `ID` , `client` , `colour`) 
VALUES (
NULL , 'sda', 'ads');

try like that


All times are GMT -4. The time now is 4:01 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC