Current location: Hot Scripts Forums » Programming Languages » PHP » Update database??


Update database??

Reply
  #1 (permalink)  
Old 12-30-03, 04:30 PM
tcooper tcooper is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Update database??

Why won't this update my database?

if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE POJOBDETAIL SET POJSKILLS=%s, POJPROJTEAM=%s, POJSUBNAME=%s, POJSUBSKILL=%s, POJDELIV=%s, POJMILE=%s, POJCOMM=%s WHERE POJJOBNO=%s",
GetSQLValueString($HTTP_POST_VARS['txtSkills'], "text"),
GetSQLValueString($HTTP_POST_VARS['txtProjTeam'], "text"),
GetSQLValueString($HTTP_POST_VARS['txtSubName'], "text"),
GetSQLValueString($HTTP_POST_VARS['txtSubSkills'], "text"),
GetSQLValueString($HTTP_POST_VARS['txtDeliver'], "text"),
GetSQLValueString($HTTP_POST_VARS['txtMilestone'], "text"),
GetSQLValueString($HTTP_POST_VARS['txtComments'], "text"),
GetSQLValueString($HTTP_POST_VARS['txtselectJobNo'], "text"));

mysql_select_db($database_Thor, $Thor);
$Result1 = mysql_query($updateSQL, $Thor) or die(mysql_error());
}


As a check if have done this
<?php
if ((isset($HTTP_POST_VARS["MM_update"]))
$ckupdate=1;
else $ckupdate=2;
echo $ckupdate ?>

This returns a value of 1 so I know MM_udpate is set.
Reply With Quote
  #2 (permalink)  
Old 12-30-03, 05:57 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
well sprintf doesnt belong where it is try placing mysql_query or mysql_db_query there and it should work
Reply With Quote
Reply

Bookmarks


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
loop through & update a mysql database ednit Perl 4 10-03-09 10:07 PM
Share database over the Internet nitinkedia The Lounge 2 11-20-03 02:07 PM
Share database over the internet nitinkedia PHP 0 07-11-03 12:22 AM
Share database over the Internet nitinkedia New Members & Introductions 1 07-10-03 02:50 PM


All times are GMT -5. The time now is 07:49 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.