i need your help.. i having a problem with mysql, when i run UPDATE query, the data wont updated..
here’s the structure..
id_demand | nama_item | hargajual | hargabeli | barcode | part_number | nosc | stat_gudang | stat_po | stat_gudang2 | request | terima | id_po | id_pr | id_npb | id_ttb | tanggal_request | tanggal_terima | final_stat | tipe
and here’s the query…
$sqlx = "UPDATE item_demand SET stat_gudang = '1' AND id_pr = '$id_PR' WHERE id_npb = '2'";
mysql_query($sqlx) or die(mysql_error());
I dont know why is my query doesnt work, can anybody help me?
I’m assuming you didn’t get any errors ? It probably means your where condition isn’t verified then.
EDIT: I just saw your syntax was wrong. Your SET clauses must be separated by commas and not “AND”. Thus :
SET stat_gudang = ‘1’, id_pr = ‘$id_PR’