Unwanted Column Updating
| From: | Jeff Oien | Date: | Sat, 03 Nov 2001 22:10:19 +0000 |
| Subject: | Unwanted Column Updating | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-13977@lists.php.net to get a copy of this message | ||
I have this which inserts a stock trade entry:
$sql1 = "INSERT INTO $table_name
(stock, shares, LorS, type, price1, time1) VALUES
(\"$stock\", \"$shares\", \"$LorS\", \"$type\",
\"$price1\", NOW())";
With price1 being the entry price and time1 the date/time of entry.
Then when I exit the trade it will do this:
$sql1 = "update $table_name set stock = '$stock',
shares = '$shares', LorS = '$LorS', type = '$type',
price1 = '$price1', price2 = '$price2', time2 = NOW() where id =
'$id'";
However, time1 is being updated to be the same as time2 after
the exit and I don't want it to be. Am I missing something?
Jeff Oien