Home » questions » MySQL insert then update in PHP on submit ? how?
MySQL insert then update in PHP on submit ? how?
i am inserting into a table and want to update a field in another one, how can i add update statement into
$insertSQL = sprintf("INSERT INTO sellbuytable (AccountNo, StockSympol, TraDate, Sell, Buy, Price, Commition, Broker) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['AccountNo'], "text"),
GetSQLValueString($_POST['Symbol'], "text"),
GetSQLValueString($_POST['tradate'], "date"),
GetSQLValueString($_POST['sell'], "double"),
GetSQLValueString($_POST['buy'], "double"),
GetSQLValueString($_POST['Price'], "double"),
GetSQLValueString($_POST['commition'], "double"),
GetSQLValueString($_POST['broker'], "text"));

Answers
look
On 2006-08-04 06:54:19
rob
On 2006-08-04 07:04:22
A A
On 2006-08-04 07:58:56
thegooddeal2000
On 2006-08-04 06:57:52