Hello, i want to update record in another table with matched id of record im adding, but how can i put actual record in sql query ? I mean, there is a variable ?
I'll try to give example:
I want to update last_sale field in items table with number of sale i am adding.
global $conn;
$strSQLUpdate = "UPDATE items SET items.last_sale = $values [sales.number] WHERE (items.id = sales.itemid )";
db_exec($strSQLUpdate,$conn);
return true;
Why isnt $values getting current record ? Isnt $values the right formula ?!