Jump to content

Simple Query help needed


elentz

Recommended Posts

I have a simple update query that I want to run from a php script.  The query will work just fine from PHPMyadmin.  But it won't update from the code I put into the script.  What have I got wrong here?

// connect to db
$conn = mysql_connect('localhost','couniq','9AXMY') or trigger_error("SQL", E_USER_ERROR);
$db = mysql_select_db('communiq_vtcrm1',$conn) or trigger_error("SQL", E_USER_ERROR);
//Update Query to do the math for the extended prices of items sold
$sql = "Update vtiger_inventoryproductrel SET extlistprice = quantity * listprice";
      $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);
mysql_close();

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/173408-simple-query-help-needed/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.