Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 Syntax Error


gaspower

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...