gaspower Posted January 13, 2009 Share Posted January 13, 2009 Hello, My server is running PHP Version 5.1.6, and I am trying to insert the below code in Quick Price Updates v1.0, //Product Cost (Bill Pratt) if($HTTP_POST_VARS['products_cost']){ //update products cost while (list($prod_id,$prod_cost) = each($products_cost)){ $crap=tep_db_query("Update products set products_cost = $prod_cost where products_id = $prod_id"); } } ---------------------- <!-- Begin Products Cost //--> <tr> <td><span class="smallText">Products Price (Cost): </span></td> <td>$<input type="text" size="7" name="products_cost[' . $results['products_id'] . ']" value="' . $results['products_cost'] . '"></td> </tr> <!-- End Products Cost //--> Error, 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where products_id = 439' at line 1 Update products set products_cost = where products_id = 439 Thanks JR Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2009 Share Posted January 13, 2009 Double check your code...syntax errors usually mean that you have a comma, quotes, a bracket or something out of place. Chelle Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2009 Share Posted January 13, 2009 This topic may help your particular error: http://www.modwest.com/help/kb6-265.html Chelle Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.