Jump to content

[SOLVED] If in database do this...


loony383

Recommended Posts

yes.

$sql = "SELECT * FROM `table` WHERE `value`='1' AND `some_other_thing`='something else';";
$result = mysql_query($sql);
if ($result){
print "error";
}
else{
mysql_query("UPDATE `table` SET `value`='1' WHERE `some_other_thing`='something else';");
}

I would help more if I knew more about what you are doing. Could you give us something to work with?

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.