User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 391,549 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,544 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 2428 | Replies: 3
Reply
Join Date: Jan 2006
Posts: 2
Reputation: mehrzadsoft is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mehrzadsoft's Avatar
mehrzadsoft mehrzadsoft is offline Offline
Newbie Poster

Help help!! update mysql problem

  #1  
Jan 8th, 2006
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());
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2004
Posts: 1,514
Reputation: kc0arf is a jewel in the rough kc0arf is a jewel in the rough kc0arf is a jewel in the rough 
Rep Power: 10
Solved Threads: 48
Colleague
kc0arf kc0arf is offline Offline
Posting Virtuoso

Re: help!! update mysql problem

  #2  
Jan 9th, 2006
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
Reply With Quote  
Join Date: Jan 2006
Posts: 2
Reputation: mehrzadsoft is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mehrzadsoft's Avatar
mehrzadsoft mehrzadsoft is offline Offline
Newbie Poster

Re: help!! update mysql problem

  #3  
Jan 9th, 2006
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!
یادباد آنکه درونت نظری با ما بود
رقم مــهر تو بر چهره*ی ما پیدا بود-----------------------------------------------------------------
O' what the good days were those, when you was in love with me.
and because of that, my face was full of happiness.Hafiz
Reply With Quote  
Join Date: Mar 2005
Location: LTT, South Africa
Posts: 125
Reputation: william_stam is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
william_stam's Avatar
william_stam william_stam is offline Offline
Junior Poster

Re: help!! update mysql problem

  #4  
Jan 15th, 2006
 UPDATE `adds` SET `client` = 'client1',`TOTALCOST` = 'totalcost' WHERE `ID` =9710 

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

try like that
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 9:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC