From: <tim...@us...> - 2010-09-08 21:41:57
|
Revision: 3722 http://web-erp.svn.sourceforge.net/web-erp/?rev=3722&view=rev Author: tim_schofield Date: 2010-09-08 21:41:50 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFTopItems.php trunk/doc/Change.log.html Modified: trunk/PDFTopItems.php =================================================================== --- trunk/PDFTopItems.php 2010-09-08 21:35:49 UTC (rev 3721) +++ trunk/PDFTopItems.php 2010-09-08 21:41:50 UTC (rev 3722) @@ -23,8 +23,8 @@ AND salesorders.debtorno = debtorsmaster.debtorno AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } else { //the situation if only location type selected "All" if ($_GET["location"] == "All") { $SQL = "SELECT salesorderdetails.stkcode, @@ -39,8 +39,8 @@ AND debtorsmaster.typeid = '" . $_GET["customers"] . "' AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } else { //the situation if the customer type selected "All" if ($_GET["customers"] == "All") { @@ -57,8 +57,8 @@ AND salesorders.fromstkloc = '" . $_GET["location"] . "' AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } else { //the situation if the location and customer type not selected "All" $SQL = " @@ -75,8 +75,8 @@ AND debtorsmaster.typeid = '" . $_GET["customers"] . "' AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } } } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-08 21:35:49 UTC (rev 3721) +++ trunk/doc/Change.log.html 2010-09-08 21:41:50 UTC (rev 3722) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/09/10 Tim: PDFTopItems.php - Correct the sql quoting</p> <p>08/09/10 Tim: PDFSuppTransListing.php - Screen layout improvements. Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockTransfer.php - Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockNegatives.php - Fix missing sql error message and correct the default date format in the heading</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |