MM_Error:MySQL Error#
i am just insert the power store! but the images/thumb is not working!
the product detail & update page
Recordset(WADAProducts)
MM_Error:MySQL Error#; 1064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near “at line 2
The code is:
<?php
$ParamProductID_WADAProducts = "-1";
if (isset($_GET['ProductID'])) {
$ParamProductID_WADAProducts = (get_magic_quotes_gpc()) ? $_GET['ProductID'] : addslashes($_GET['ProductID']);
}
mysql_select_db($database_localhost, $localhost);
$query_WADAProducts = sprintf("SELECT *, (ProductStock - (SELECT Coalesce(Sum(DetailQuantity),0) FROM orderdetails INNER JOIN orders ON OrderID = DetailOrderID WHERE DetailProductID = ProductID AND OrderDate > ProductUpdateDate)) AS NumLeft <<<<<<< SELECT *>>>>>>> FROM products WHERE ProductID = %s", GetSQLValueString($ParamProductID_WADAProducts, "int"));
$WADAProducts = mysql_query($query_WADAProducts, $localhost) or die(mysql_error());
$row_WADAProducts = mysql_fetch_assoc($WADAProducts);
$totalRows_WADAProducts = mysql_num_rows($WADAProducts);
When i add the SELECT * ON THE NumLeft <<<< Here >>>>> The to fix the Recordset(WADAProducts)
MM_Error:MySQL Error#; When Error is fix. Not coming ! But the product detail & update page is not working. i try refresh mysql again. still the same.
So. Can you teach me how to fix this ?