944,117 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 4802
  • MySQL RSS
Jan 8th, 2006
0

help!! update mysql problem

Expand Post »
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:
MySQL Syntax (Toggle Plain Text)
  1. $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:
MySQL Syntax (Toggle Plain Text)
  1. $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());
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mehrzadsoft is offline Offline
2 posts
since Jan 2006
Jan 9th, 2006
0

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
Team Colleague
Reputation Points: 121
Solved Threads: 57
Posting Virtuoso
kc0arf is offline Offline
1,629 posts
since Mar 2004
Jan 9th, 2006
0

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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mehrzadsoft is offline Offline
2 posts
since Jan 2006
Jan 15th, 2006
0

Re: help!! update mysql problem

MySQL Syntax (Toggle Plain Text)
  1. UPDATE `adds` SET `client` = 'client1',`TOTALCOST` = 'totalcost' WHERE `ID` =9710

MySQL Syntax (Toggle Plain Text)
  1. INSERT INTO `adds` ( `ID` , `client` , `colour`)
  2. VALUES (
  3. NULL , 'sda', 'ads');

try like that
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: ERROR 2002: Can't connect to local MySQL server
Next Thread in MySQL Forum Timeline: update problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC