SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: help me with this query
-
Oct 15, 2004, 17:30 #1
- Join Date
- Sep 2004
- Location
- victoria
- Posts
- 210
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
help me with this query
PHP Code:$dates = $_POST['date'];
$descriptions = $_POST['description'];
$contents = $_POST['content'];
$names = $_POST['name'];
$logos = $_POST['logo'];
$categorys = $_POST['category'];
$datesub = addslashes($dates);
$descriptionsub = addslashes($descriptions);
$contentsub = addslashes($contents);
$namesub = addslashes($names);
$logosub = addslashes($logos);
$categorysub = addslashes($categorys);
$idsub = addslashes($_POST['id']);
$link_query = "
UPDATE articles
SET date = '$datesub',
SET description = '$descriptionsub',
SET content = '$contentsub',
SET name = '$namesub',
SET logo = '$logosub',
SET category = '$categorysub'
WHERE id = $idsub;
";
date is a date field, content is a text field, all else is varchar
-
Oct 15, 2004, 17:34 #2
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
there should be only one SET keyword
Code:update articles set date = '$datesub' , description = '$descriptionsub' , content = '$contentsub' , name = '$namesub' , logo = '$logosub' , category = '$categorysub' where id = $idsub
-
Oct 15, 2004, 17:36 #3
- Join Date
- Sep 2004
- Location
- victoria
- Posts
- 210
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thank you <3
Got it, thanks all
-
Oct 15, 2004, 17:41 #4
- Join Date
- Aug 2003
- Location
- Manchester, UK
- Posts
- 4,007
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
SET date = '$datesub'
Bookmarks