elentz Posted September 7, 2009 Share Posted September 7, 2009 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 More sharing options...
Lyleyboy Posted September 7, 2009 Share Posted September 7, 2009 Do you get any error messages? Link to comment https://forums.phpfreaks.com/topic/173408-simple-query-help-needed/#findComment-914266 Share on other sites More sharing options...
elentz Posted September 8, 2009 Author Share Posted September 8, 2009 Nope Link to comment https://forums.phpfreaks.com/topic/173408-simple-query-help-needed/#findComment-914763 Share on other sites More sharing options...
PFMaBiSmAd Posted September 8, 2009 Share Posted September 8, 2009 What does adding the following two lines immediately after the first opening <?php tag give - ini_set("display_errors", "1"); error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/173408-simple-query-help-needed/#findComment-914768 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.