Jump to content

[SOLVED] update query not updating record


vinpkl

Recommended Posts

hi all

 

i m updating my database table with the below code but its not updating.

 

In database field name is "track_id" VARCHAR (60)

 

$track_id=$_REQUEST['track_id'];

if(isset($_REQUEST['submit']))
{

$track_id=$_REQUEST['track_id'];
$qry_trk="update new_order set track_id = '$track_id' where order_id = $id ";
echo $qry_trk;
if(mysql_query(qry_trk))
{
$msg2="tracking id added & updated in database";
}
else
{
$msg2="tracking id not updated";
}

}

 

on echo it displays corect information but it doesnt updates.

update new_order set track_id = 'AS12345678' where order_id = 370 

 

when i insert the above line in sql then it updates corectly but why is it not updating from php code.

 

vineet

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.