Topic: database error
The sql query can run correctly on the mysql older version i.e. 4.12 while it gives error when they are running on mysql version like 5+.
Query:
"INSERT INTO ".TB_PREF."stock_moves (stock_id, trans_no, type, loc_code,
tran_date, person_id, reference, qty, standard_cost, visible, price,
discount_percent) VALUES ('$stock_id', $trans_no, $type,
'$location', '$date', '$person_id', '$reference', $quantity, $std_cost,
$show_or_hide, $price, $discount_percent)";
It is explanation : Where $person_id = null