PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
pella.d
Forum Newbie
Posts: 11 Joined: Mon Apr 11, 2005 3:05 am
Post
by pella.d » Thu Apr 14, 2005 6:54 am
i seem to be not be able to get this to work.
Any help would be great thanks.
Code: Select all
UPDATE newstest
SET('subject', 'date', 'content')
VALUES('$editSubject', '$editDate', '$editContent')
WHERE id=$editRow LIMIT 1
Sphen001
Forum Contributor
Posts: 107 Joined: Thu Mar 10, 2005 12:24 pm
Location: Land of the Beaver
Post
by Sphen001 » Thu Apr 14, 2005 7:01 am
Hi,
Try putting the $editRow in single quotes.
Sphen001
pella.d
Forum Newbie
Posts: 11 Joined: Mon Apr 11, 2005 3:05 am
Post
by pella.d » Thu Apr 14, 2005 7:04 am
Still wont work.
n00b Saibot
DevNet Resident
Posts: 1452 Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:
Post
by n00b Saibot » Thu Apr 14, 2005 7:10 am
Your SQL is wrong! This will work...
Code: Select all
UPDATE newstest
SET `subject`='$editSubject', `date`='$editDate', `content`='$editContent'
WHERE id=$editRow LIMIT 1
pella.d
Forum Newbie
Posts: 11 Joined: Mon Apr 11, 2005 3:05 am
Post
by pella.d » Thu Apr 14, 2005 7:10 am
Well that did it,
thank you kindly.
How come the copy i had didnt work? I took it right from mysql.com