[Weberp-svn] SF.net SVN: weberp:[4196] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <sot...@us...> - 2011-01-09 12:36:59
|
Revision: 4196 http://weberp.svn.sourceforge.net/weberp/?rev=4196&view=rev Author: sotandeka Date: 2011-01-09 12:36:52 +0000 (Sun, 09 Jan 2011) Log Message: ----------- Correct the quotes in SQL literals Modified Paths: -------------- trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DailyBankTransactions.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -14,12 +14,12 @@ echo '<table class=selection>'; - $SQL = 'SELECT bankaccountname, + $SQL = "SELECT bankaccountname, bankaccounts.accountcode, bankaccounts.currcode FROM bankaccounts, chartmaster - WHERE bankaccounts.accountcode=chartmaster.accountcode'; + WHERE bankaccounts.accountcode=chartmaster.accountcode"; $ErrMsg = _('The bank accounts could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the bank accounts was'); @@ -118,4 +118,4 @@ } include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DailySalesInquiry.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -25,7 +25,7 @@ $_POST['MonthToShow'] = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); } -$PeriodsResult = DB_query('SELECT periodno, lastdate_in_period FROM periods',$db); +$PeriodsResult = DB_query("SELECT periodno, lastdate_in_period FROM periods",$db); while ($PeriodRow = DB_fetch_array($PeriodsResult)){ if ($_POST['MonthToShow']==$PeriodRow['periodno']) { @@ -38,7 +38,7 @@ echo '</select></td>'; echo '<td>' . _('Salesperson') . ':</td><td><select tabindex=2 name="Salesperson">'; -$SalespeopleResult = DB_query('SELECT salesmancode, salesmanname FROM salesman',$db); +$SalespeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); if (!isset($_POST['Salesperson'])){ $_POST['Salesperson'] = 'All'; echo '<option selected value="All">' . _('All') . '</option>'; @@ -180,4 +180,4 @@ echo '</table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DebtorsAtPeriodEnd.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -150,7 +150,7 @@ echo '<tr><td>' . _('Balances As At') . ":</td><td><select tabindex=3 Name='PeriodEnd'>"; - $sql = 'SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC'; + $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db,_('Could not retrieve period data because'),_('The SQL that failed to get the period data was')); while ($myrow = DB_fetch_array($Periods,$db)){ @@ -168,4 +168,4 @@ include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> \ No newline at end of file +?> Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DeliveryDetails.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -918,8 +918,8 @@ $ErrMsg = _('The stock locations could not be retrieved'); $DbgMsg = _('SQL used to retrieve the stock locations was') . ':'; -$StkLocsResult = DB_query('SELECT locationname,loccode - FROM locations',$db, $ErrMsg, $DbgMsg); +$StkLocsResult = DB_query("SELECT locationname,loccode + FROM locations",$db, $ErrMsg, $DbgMsg); while ($myrow=DB_fetch_row($StkLocsResult)){ if ($_SESSION['Items'.$identifier]->Location==$myrow[1]){ @@ -1055,8 +1055,8 @@ echo '<tr><td>'. _('Freight/Shipper Method') .':</td><td><select name="ShipVia">'; $ErrMsg = _('The shipper details could not be retrieved'); $DbgMsg = _('SQL used to retrieve the shipper details was') . ':'; -$sql = 'SELECT shipper_id, shippername - FROM shippers'; +$sql = "SELECT shipper_id, shippername + FROM shippers"; $ShipperResults = DB_query($sql,$db,$ErrMsg,$DbgMsg); while ($myrow=DB_fetch_array($ShipperResults)){ if ($myrow['shipper_id']==$_POST['ShipVia']){ @@ -1093,4 +1093,4 @@ echo '</div></form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-01-09 12:28:19 UTC (rev 4195) +++ trunk/DiscountCategories.php 2011-01-09 12:36:52 UTC (rev 4196) @@ -127,12 +127,12 @@ if (isset($_POST['search'])) { if ($_POST['PartID']!='' and $_POST['PartDesc']=='') - $sql='SELECT stockid, description FROM stockmaster WHERE stockid LIKE"%'.$_POST['PartID'].'%"'; + $sql="SELECT stockid, description FROM stockmaster WHERE stockid LIKE '%".$_POST['PartID']."%'"; if ($_POST['PartID']=='' and $_POST['PartDesc']!='') - $sql='SELECT stockid, description FROM stockmaster WHERE description LIKE"%'.$_POST['PartDesc'].'%"'; + $sql="SELECT stockid, description FROM stockmaster WHERE description LIKE '%".$_POST['PartDesc']."%'"; if ($_POST['PartID']!='' and $_POST['PartDesc']!='') - $sql='SELECT stockid, description FROM stockmaster WHERE stockid LIKE"%'.$_POST['PartID'].'%" and - description LIKE"%'.$_POST['PartDesc'].'%"'; + $sql="SELECT stockid, description FROM stockmaster WHERE stockid LIKE '%".$_POST['PartID']."%' and + description LIKE '%".$_POST['PartDesc']."%'"; $result=DB_query($sql,$db); if (!isset($_POST['stockID'])) { echo _('Select a part code').':<br>'; @@ -145,9 +145,9 @@ echo '<table class=selection><tr><td>'._('Assign discount category').'</td>'; echo '<td><input type="text" name="DiscountCategory" maxlength=2 size=2></td>'; echo '<td>'._('to all items in stock category').'</td>'; - $sql = 'SELECT categoryid, + $sql = "SELECT categoryid, categorydescription - FROM stockcategory'; + FROM stockcategory"; $result = DB_query($sql, $db); echo '<td><select name="stockcategory">'; while ($myrow=DB_fetch_array($result)) { @@ -232,4 +232,4 @@ } include('includes/footer.inc'); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |