Why isn't this working?
Date: 06/24/05
(PHP Community) Keywords: mysql, sql
I have this line on one page..
$update_totals = "UPDATE stock SET qty = $add, count = $newtotal WHERE barcode = $barcode";
$update = mysql_query($update_totals, $connect);
..and it works fine. I have an if statement echoing "success, bla bla.." if it works and it's great. So why is it that this:
$update_details = "UPDATE stock SET barcode = $barcode, prod_code = '$prodcode', printer_model = '$print_mod', desc = '$type', qty = $qty, count = $count, colour = '$colour', order_level = $reorder WHERE barcode = $old_bcode";
$update_qry = mysql_query($update_details, $connect);
..doesn't work? What am I missing/not doing?
RESOLVED thanks everyone :)
Source: http://www.livejournal.com/community/php/312514.html