Jump to content

Recommended Posts

Ah.  You made it sound like you had not tried it and were just curious if it would work.

 

Try this:

 

mysql_query("UPDATE dreg SET lid = \"$newlid\" WHERE lid = \"$lid\" AND sid = \"$sid\"")or die(mysql_error());

 

If that does not work, I would double check all of your table and columnames.

Link to comment
https://forums.phpfreaks.com/topic/102623-query-question/#findComment-525594
Share on other sites

You need a connection to the database.  E.G.

 

$cxn = mysqli_connect($host,$user,$password,$db);

$sq1 = "UPDATE messages SET Message=\"$message\" WHERE MessageNumb=\"$id\"";

$result = mysqli_query($cxn,$sq1);

 

In this case:

$connection = mysqli_connect($host,$user,$password,$db);
$query = "UPDATE dreg SET lid = \"$newlid\" WHERE lid = \"$lid\" AND sid = \"$sid\"";
$result = mysqli_query($connection,$query);

Link to comment
https://forums.phpfreaks.com/topic/102623-query-question/#findComment-525602
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.