Every month I use the Sales Report to generate sales on specific products using the feature ' Only include specific Product IDs (comma separated list) '. I paste in different lists of the products to generate the report. It has been working great until my Hosting Service recently upgraded our servers and PHP version to 5.3.2, and MYSQL version 5.1.65. Now when I run the report, I am limited to what looks like 150 csv values???
If I paste in less than 150, the report generates.
I get the following error in /admin/stats_sales_report.php when I paste in more than 150 csv values:
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 '' at line 1
in:
[select distinct pd.products_name from zen_products_description pd where products_id = ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Here is the code in question:
PHP Code:
<?php if ($_GET['doCustInc']== 'on' || $_GET['doProdInc']== 'on') {
// if reporting for a specific product, build up a string of product descriptions
$i = 0;
$header_string = "";
$include_products = explode(",",$_GET['prod_includes']);
if ($_GET['doProdInc']== 'on' && DISPLAY_TABLE_HEADING_PRODUCTS) {
foreach($include_products as $cID) {
$tempAry = $db->Execute("select distinct pd.products_name from " .
TABLE_PRODUCTS_DESCRIPTION . " pd where products_id = " . trim($cID));
if ($i == 0) {
$header_string = $tempAry->fields['products_name'] ;
}
else
{
$header_string .= ", " . $tempAry->fields['products_name'];
}
$i++;
}
}
Anybody else have this problem and/or have a clue how to fix it?
PS. I also upgraded to the latest version and get the same error.
Bookmarks