Jump to content

Mysql update help


voxxtelum

Recommended Posts

Hey

is it possible to update a row where the column I want to update changes.  For example

$update_user_part = mysql_query("update user_parts set '$new_part_id' = 1 where userid = '$user_id'");

I tried that and it is not working and the only thing that I could narrow  it down to was the variable.  Is there a way I can do this using a variable?  The only solution I can think of is setting up a switch case and running a different update for each one.  Is there a more efficient way to do this?

Link to comment
https://forums.phpfreaks.com/topic/92621-mysql-update-help/
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.