Jump to content

Query Question


refiking

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.