From: <dai...@us...> - 2011-03-26 22:11:54
|
Revision: 4518 http://web-erp.svn.sourceforge.net/web-erp/?rev=4518&view=rev Author: daintree Date: 2011-03-26 22:11:47 +0000 (Sat, 26 Mar 2011) Log Message: ----------- SQL ansi fixes - remove typo resulting in visible <td> in WorkOrderIssue.php Modified Paths: -------------- trunk/MRP.php trunk/WorkOrderIssue.php trunk/doc/Change.log.html trunk/doc/README.txt trunk/includes/ConnectDB.inc trunk/includes/ConnectDB_mysqli.inc trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-03-26 03:33:53 UTC (rev 4517) +++ trunk/MRP.php 2011-03-26 22:11:47 UTC (rev 4518) @@ -25,14 +25,14 @@ $result = DB_query('DROP TABLE IF EXISTS levels',$db); $sql = 'CREATE TEMPORARY TABLE passbom (part char(20), - sortpart text) DEFAULT CHARSET=utf8'; + sortpart text) DEFAULT CHARSET=utf8'; $ErrMsg = _('The SQL to to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $sql = 'CREATE TEMPORARY TABLE tempbom (parent char(20), - component char(20), - sortpart text, - level int) DEFAULT CHARSET=utf8'; + component char(20), + sortpart text, + level int) DEFAULT CHARSET=utf8'; $result = DB_query($sql,$db,_('Create of tempbom failed because')); // To create levels, first, find parts in bom that are top level assemblies. // Do this by doing a LEFT JOIN from bom to bom (as bom2), linking @@ -44,11 +44,11 @@ prnMsg(_('Creating first level'),'info'); flush(); // This finds the top level - $sql = 'INSERT INTO passbom (part, sortpart) + $sql = "INSERT INTO passbom (part, sortpart) SELECT bom.component AS part, - CONCAT(bom.parent,"%",bom.component) AS sortpart + CONCAT(bom.parent,'%',bom.component) AS sortpart FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component - WHERE bom2.component IS NULL'; + WHERE bom2.component IS NULL"; $result = DB_query($sql,$db); $lctr = 2; @@ -132,32 +132,32 @@ flush(); // Create levels from bomlevels using the highest level number found for a part - $sql = 'CREATE TABLE levels ( + $sql = "CREATE TABLE levels ( part char(20), level int, - leadtime smallint(6) NOT NULL default "0", - pansize double NOT NULL default "0", - shrinkfactor double NOT NULL default "0", - eoq double NOT NULL default "0") DEFAULT CHARSET=utf8'; + leadtime smallint(6) NOT NULL default '0', + pansize double NOT NULL default '0', + shrinkfactor double NOT NULL default '0', + eoq double NOT NULL default '0') DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db); $sql = 'INSERT INTO levels (part, - level, - leadtime, - pansize, - shrinkfactor, - eoq) - SELECT bomlevels.part, - MAX(bomlevels.level), - 0, - pansize, - shrinkfactor, - stockmaster.eoq - FROM bomlevels - INNER JOIN stockmaster ON bomlevels.part = stockmaster.stockid - GROUP BY bomlevels.part, - pansize, - shrinkfactor, - stockmaster.eoq'; + level, + leadtime, + pansize, + shrinkfactor, + eoq) + SELECT bomlevels.part, + MAX(bomlevels.level), + 0, + pansize, + shrinkfactor, + stockmaster.eoq + FROM bomlevels + INNER JOIN stockmaster ON bomlevels.part = stockmaster.stockid + GROUP BY bomlevels.part, + pansize, + shrinkfactor, + stockmaster.eoq'; $result = DB_query($sql,$db); $sql = 'ALTER TABLE levels ADD INDEX part(part)'; $result = DB_query($sql,$db); @@ -166,26 +166,26 @@ // are not in bom $sql = 'INSERT INTO levels (part, - level, - leadtime, - pansize, - shrinkfactor, - eoq) - SELECT stockmaster.stockid AS part, - 0, - 0, - stockmaster.pansize, - stockmaster.shrinkfactor, - stockmaster.eoq - FROM stockmaster - LEFT JOIN levels ON stockmaster.stockid = levels.part - WHERE levels.part IS NULL'; + level, + leadtime, + pansize, + shrinkfactor, + eoq) + SELECT stockmaster.stockid AS part, + 0, + 0, + stockmaster.pansize, + stockmaster.shrinkfactor, + stockmaster.eoq + FROM stockmaster + LEFT JOIN levels ON stockmaster.stockid = levels.part + WHERE levels.part IS NULL'; $result = DB_query($sql,$db); // Update leadtime in levels from purchdata. Do it twice so can make sure leadtime from preferred // vendor is used $sql = 'UPDATE levels,purchdata - SET levels.leadtime = purchdata.leadtime + SET levels.leadtime = purchdata.leadtime WHERE levels.part = purchdata.stockid AND purchdata.leadtime > 0'; $result = DB_query($sql,$db); @@ -220,99 +220,98 @@ // CreateLowerLevelRequirement() function. Mostly do this so can distinguish the type // of requirements for the MRPShortageReport so don't show double requirements. $sql = 'CREATE TABLE mrprequirements ( part char(20), - daterequired date, - quantity double, - mrpdemandtype varchar(6), - orderno int(11), - directdemand smallint, - whererequired char(20)) DEFAULT CHARSET=utf8'; + daterequired date, + quantity double, + mrpdemandtype varchar(6), + orderno int(11), + directdemand smallint, + whererequired char(20)) DEFAULT CHARSET=utf8'; $result = DB_query($sql,$db,_('Create of mrprequirements failed because')); prnMsg(_('Loading requirements from sales orders'),'info'); flush(); - $sql = 'INSERT INTO mrprequirements (part, - daterequired, - quantity, - mrpdemandtype, - orderno, - directdemand, - whererequired) - SELECT stkcode, - deliverydate, - (quantity - qtyinvoiced) AS netqty, - "SO", - salesorderdetails.orderno, - "1", - stkcode - FROM salesorders, salesorderdetails - WHERE salesorders.orderno = salesorderdetails.orderno - AND (quantity - qtyinvoiced) > 0 - AND salesorderdetails.completed = 0 - AND salesorders.quotation = 0'; + $sql = "INSERT INTO mrprequirements (part, + daterequired, + quantity, + mrpdemandtype, + orderno, + directdemand, + whererequired) + SELECT stkcode, + deliverydate, + (quantity - qtyinvoiced) AS netqty, + 'SO', + salesorderdetails.orderno, + '1', + stkcode + FROM salesorders, salesorderdetails + WHERE salesorders.orderno = salesorderdetails.orderno + AND (quantity - qtyinvoiced) > 0 + AND salesorderdetails.completed = 0 + AND salesorders.quotation = 0"; $result = DB_query($sql,$db); - prnMsg(_('Loading requirements from work orders'),'info'); flush(); // Definition of demand from SelectProduct.php - $sql = 'INSERT INTO mrprequirements (part, - daterequired, - quantity, - mrpdemandtype, - orderno, - directdemand, - whererequired) - SELECT worequirements.stockid, - workorders.requiredby, - qtypu*(woitems.qtyreqd - woitems.qtyrecd) AS netqty, - "WO", - woitems.wo, - "1", - parentstockid - FROM woitems INNER JOIN worequirements - ON woitems.stockid=worequirements.parentstockid - INNER JOIN workorders - ON woitems.wo=workorders.wo - AND woitems.wo=worequirements.wo - WHERE workorders.closed=0'; + $sql = "INSERT INTO mrprequirements (part, + daterequired, + quantity, + mrpdemandtype, + orderno, + directdemand, + whererequired) + SELECT worequirements.stockid, + workorders.requiredby, + qtypu*(woitems.qtyreqd - woitems.qtyrecd) AS netqty, + 'WO', + woitems.wo, + '1', + parentstockid + FROM woitems INNER JOIN worequirements + ON woitems.stockid=worequirements.parentstockid + INNER JOIN workorders + ON woitems.wo=workorders.wo + AND woitems.wo=worequirements.wo + WHERE workorders.closed=0"; $result = DB_query($sql,$db); - $sql = 'INSERT INTO mrprequirements (part, - daterequired, - quantity, - mrpdemandtype, - orderno, - directdemand, - whererequired) - SELECT stockid, - duedate, - quantity, - mrpdemandtype, - demandid, - "1", - stockid - FROM mrpdemands'; + $sql = "INSERT INTO mrprequirements (part, + daterequired, + quantity, + mrpdemandtype, + orderno, + directdemand, + whererequired) + SELECT stockid, + duedate, + quantity, + mrpdemandtype, + demandid, + '1', + stockid + FROM mrpdemands"; if ($_POST['usemrpdemands'] == 'y') { $result = DB_query($sql,$db); prnMsg(_('Loading requirements based on mrpdemands'),'info'); flush(); } - $sql = 'INSERT INTO mrprequirements (part, - daterequired, - quantity, - mrpdemandtype, - orderno, - directdemand, - whererequired) - SELECT stockid, - NOW(), - (reorderlevel - quantity) AS reordqty, - "REORD", - "1", - "1", - stockid - FROM locstock - WHERE reorderlevel > quantity'; + $sql = "INSERT INTO mrprequirements (part, + daterequired, + quantity, + mrpdemandtype, + orderno, + directdemand, + whererequired) + SELECT stockid, + NOW(), + (reorderlevel - quantity) AS reordqty, + 'REORD', + '1', + '1', + stockid + FROM locstock + WHERE reorderlevel > quantity"; $result = DB_query($sql,$db); prnMsg(_('Loading requirements based on reorder level'),'info'); flush(); @@ -327,40 +326,40 @@ // updateflag is set to 1 in UpdateSupplies if change date when matching requirements to // supplies. Actually only change update flag in the array created from mrpsupplies $sql = 'CREATE TABLE mrpsupplies ( id int(11) NOT NULL auto_increment, - part char(20), - duedate date, - supplyquantity double, - ordertype varchar(6), - orderno int(11), - mrpdate date, - updateflag smallint(6), - PRIMARY KEY (id)) DEFAULT CHARSET=utf8'; + part char(20), + duedate date, + supplyquantity double, + ordertype varchar(6), + orderno int(11), + mrpdate date, + updateflag smallint(6), + PRIMARY KEY (id)) DEFAULT CHARSET=utf8'; $result = DB_query($sql,$db,_('Create of mrpsupplies failed because')); prnMsg(_('Loading supplies from purchase orders'),'info'); flush(); - $sql = 'INSERT INTO mrpsupplies (id, - part, - duedate, - supplyquantity, - ordertype, - orderno, - mrpdate, - updateflag) - SELECT Null, - purchorderdetails.itemcode, - purchorderdetails.deliverydate, - (quantityord - quantityrecd) AS netqty, - "PO", - purchorderdetails.orderno, - purchorderdetails.deliverydate, - 0 - FROM purchorderdetails, - purchorders - WHERE purchorderdetails.orderno = purchorders.orderno - AND purchorders.status != "Cancelled" - AND purchorders.status != "Rejected" - AND(quantityord - quantityrecd) > 0'; + $sql = "INSERT INTO mrpsupplies (id, + part, + duedate, + supplyquantity, + ordertype, + orderno, + mrpdate, + updateflag) + SELECT Null, + purchorderdetails.itemcode, + purchorderdetails.deliverydate, + (quantityord - quantityrecd) AS netqty, + 'PO', + purchorderdetails.orderno, + purchorderdetails.deliverydate, + 0 + FROM purchorderdetails, + purchorders + WHERE purchorderdetails.orderno = purchorders.orderno + AND purchorders.status != 'Cancelled' + AND purchorders.status != 'Rejected' + AND(quantityord - quantityrecd) > 0"; $result = DB_query($sql,$db); prnMsg(_('Loading supplies from inventory on hand'),'info'); @@ -382,49 +381,49 @@ } // End of foreach $WhereLocation .= ')'; } - $sql = 'INSERT INTO mrpsupplies (id, - part, - duedate, - supplyquantity, - ordertype, - orderno, - mrpdate, - updateflag) - SELECT Null, - stockid, - "0000-00-00", - SUM(quantity), - "QOH", - 1, - "0000-00-00", - 0 - FROM locstock - WHERE quantity > 0 ' . - $WhereLocation . - 'GROUP BY stockid'; + $sql = "INSERT INTO mrpsupplies (id, + part, + duedate, + supplyquantity, + ordertype, + orderno, + mrpdate, + updateflag) + SELECT Null, + stockid, + '0000-00-00', + SUM(quantity), + 'QOH', + 1, + '0000-00-00', + 0 + FROM locstock + WHERE quantity > 0 " . + $WhereLocation . + 'GROUP BY stockid'; $result = DB_query($sql,$db); prnMsg(_('Loading supplies from work orders'),'info'); flush(); - $sql = 'INSERT INTO mrpsupplies (id, - part, - duedate, - supplyquantity, - ordertype, - orderno, - mrpdate, - updateflag) - SELECT Null, - stockid, - workorders.requiredby, - (woitems.qtyreqd-woitems.qtyrecd) AS netqty, - "WO", - woitems.wo, - workorders.requiredby, - 0 - FROM woitems INNER JOIN workorders - ON woitems.wo=workorders.wo - WHERE workorders.closed=0'; + $sql = "INSERT INTO mrpsupplies (id, + part, + duedate, + supplyquantity, + ordertype, + orderno, + mrpdate, + updateflag) + SELECT Null, + stockid, + workorders.requiredby, + (woitems.qtyreqd-woitems.qtyrecd) AS netqty, + 'WO', + woitems.wo, + workorders.requiredby, + 0 + FROM woitems INNER JOIN workorders + ON woitems.wo=workorders.wo + WHERE workorders.closed=0"; $result = DB_query($sql,$db); $sql = 'ALTER TABLE mrpsupplies ADD INDEX part(part)'; @@ -462,7 +461,7 @@ // part, that serves as a gross requirement for a lower level part, so will read down through // the Bill of Materials to generate those requirements in function LevelNetting(). for ($level = $maxlevel; $level >= $minlevel; $level--) { - $sql = 'SELECT * FROM levels WHERE level = "' . $level .'" LIMIT 50000'; //should cover most eventualities!! ... yes indeed :-) + $sql = "SELECT * FROM levels WHERE level = '" . $level ."' LIMIT 50000"; //should cover most eventualities!! ... yes indeed :-) prnMsg('</br>------ ' . _('Processing level') .' ' . $level . ' ------','info'); flush(); @@ -497,19 +496,19 @@ } // End of if } // End of foreach $sql = "INSERT INTO mrpparameters (runtime, - location, - pansizeflag, - shrinkageflag, - eoqflag, - usemrpdemands, - leeway) - VALUES (NOW(), - '" . $locparm . "', - '" . $_POST['pansizeflag'] . "', - '" . $_POST['shrinkageflag'] . "', - '" . $_POST['eoqflag'] . "', - '" . $_POST['usemrpdemands'] . "', - '" . $_POST['Leeway'] . "')"; + location, + pansizeflag, + shrinkageflag, + eoqflag, + usemrpdemands, + leeway) + VALUES (NOW(), + '" . $locparm . "', + '" . $_POST['pansizeflag'] . "', + '" . $_POST['shrinkageflag'] . "', + '" . $_POST['eoqflag'] . "', + '" . $_POST['usemrpdemands'] . "', + '" . $_POST['Leeway'] . "')"; $result = DB_query($sql,$db); } else { // End of if submit isset @@ -556,7 +555,7 @@ } echo "<p><form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<td><table class=selection>'; + echo '<table class=selection>'; // Generate selections for Location echo '<tr><th colspan=3><font color=blue size=3>'._('This Run Details').'</font></th></tr>'; echo '<tr> @@ -804,7 +803,7 @@ $newdate = FormatDateForSQL($dateadd); } - $component = $myrow['component']; + $component = $myrow['component']; $extendedquantity = $myrow['quantity'] * $topquantity; // Commented out the following lines 8/15/09 because the eoq should be considered in the // LevelNetting() function where $excessqty is calculated Modified: trunk/WorkOrderIssue.php =================================================================== --- trunk/WorkOrderIssue.php 2011-03-26 03:33:53 UTC (rev 4517) +++ trunk/WorkOrderIssue.php 2011-03-26 22:11:47 UTC (rev 4518) @@ -556,8 +556,8 @@ echo '</select>'; } else { $LocResult = DB_query("SELECT loccode, locationname - FROM locations - WHERE loccode='" . $_POST['FromLocation'] . "'", + FROM locations + WHERE loccode='" . $_POST['FromLocation'] . "'", $db); $LocRow = DB_fetch_array($LocResult); echo '<input type="hidden" name="FromLocation" value="' . $_POST['FromLocation'] . '">'; @@ -615,10 +615,10 @@ echo '<table class=selection><tr><td>' . _('Select a stock category') . ':<select name="StockCat">'; if (!isset($_POST['StockCat'])){ - echo "<option selected VALUE='All'>" . _('All'); + echo "<option selected VALUE='All'>" . _('All') . '</option>'; $_POST['StockCat'] ='All'; } else { - echo "<option VALUE='All'>" . _('All'); + echo "<option VALUE='All'>" . _('All') . '</option>'; } while ($myrow1 = DB_fetch_array($result1)) { @@ -636,7 +636,7 @@ <td><input type="Text" name="Keywords" size=20 maxlength=25 VALUE="<?php if (isset($_POST['Keywords'])) echo $_POST['Keywords']; ?>"></td></tr> <tr><td></td> <td><font SIZE 3><b><?php echo _('OR'); ?> </b></font><?php echo _('Enter extract of the'); ?> <b><?php echo _('Stock Code'); ?></b>:</td> - <td><input type="Text" name="StockCode" size=15 maxlength=18 VALUE="<?php if (isset($_POST['StockCode'])) echo $_POST['StockCode']; ?>"></td> + <td><input type="Text" name="StockCode" size="15" maxlength="18" VALUE="<?php if (isset($_POST['StockCode'])) echo $_POST['StockCode']; ?>"></td> </tr> </table> <br /><div class="centre"><input type=submit name="Search" VALUE="<?php echo _('Search Now'); ?>"> @@ -767,13 +767,13 @@ <td><input type="textbox" name="Qty' . $i .'"></td></tr>'; } echo '<input type="hidden" name="IssueItem" value="' . $_POST['IssueItem'] . '">'; - echo '<tr><td colspan=2><div class=centre><input type=submit name="Process" value="' . _('Process Items Issued') . '"><</div>/td></tr>'; + echo '<tr><td colspan=2><div class=centre><input type=submit name="Process" value="' . _('Process Items Issued') . '"></div></td></tr>'; } //end of lot/batch control } else { //not controlled - an easy one! echo '<input type="hidden" name="IssueItem" value="' . $_POST['IssueItem'] . '">'; echo '<tr><td>' . _('Quantity Issued') . ':</td> <td><input class=number type="textbox" name="Qty"></tr>'; - echo '<tr><td colspan=2><div class=centre><input type=submit name="Process" value="' . _('Process Items Issued') . '"></div></td></tr>'; + echo '<tr><td colspan=2><input type=submit name="Process" value="' . _('Process Items Issued') . '"></div></td></tr>'; } } //end if selecting new item to issue or entering the issued item quantities echo '</table>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-03-26 03:33:53 UTC (rev 4517) +++ trunk/doc/Change.log.html 2011-03-26 22:11:47 UTC (rev 4518) @@ -20,7 +20,7 @@ <p>10/3/11: Phil fix pagination of PrintCustOrder_generic.php - second copy was not restarting page numbers</p> <p>10/3/11: Tims launchpad fixes brought in MRP.php fix for table charset utf8 so joins work correctly; typeo in PO_Header preventing purchasing data being retrieved ($result not $Result); correct sql on searching for customer in SelectCreditItems.php; StockStatus.php pricing history bug resolved (4450); StockQuantityByDate.php now allowed to show for all categories - enclosed 'All' in gettext</p> <p>8/3/11: Tim/Phil PO_Items.php in committing an order detail the assetid of 'Not an Asset' was being inserted to an integer field. Modified $_POST['AssetID'] to = 0 if it was 'Not an Asset' as advised by Tim</p> -<p>8/3/11:Phil fix SalesAnalysis reports for TCPDF as reported by Joe Zhou</p> +<p>8/3/11: Phil fix SalesAnalysis reports for TCPDF as reported by Joe Zhou</p> <p>5/3/11: Kovács Attila fix to Stocks.php to use ANSI GROUP BY for aggregate functions SQL</p> <p>5/3/11: Kovács Attila fix to LanguageSetup.php to use utf-8 not ISO-8859-1. Phil hardcoded UTF-8 now as no dynamic changing of character set required all translations are utf-8</p> <p>3/3/11: Exson/Baran/Phil fix to customer login to ensure that other customers orders are not displayed when searching by customer ref or order no</p> Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-03-26 03:33:53 UTC (rev 4517) +++ trunk/doc/README.txt 2011-03-26 22:11:47 UTC (rev 4518) @@ -2,8 +2,28 @@ /* $Id$*/ -Thankyou for using webERP. +Version 4.03 of webERP +Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. + +Also, this release comes with an automated database upgrade system, so that database changes in later versions will be applied automatically on upgrade of the scripts. + +Other than the re-engineering of pdf reporting using the TCPDF pdf report creation class, that has enabled the utf-8 pdf reporting, the other new areas of functionality since the 3 series include: + +1. Fixed assets module, this allows the recording of fixed asset additions, depreciation calculations on a monthly basis and disposals all integrated with the sale/debtors system with appropriate general ledger journals also created. + +2. Contract Costing functionality that allows contracts to be defined and the costs recorded against the contract. Contracts can be created using items from stock and also other items that might be required to be purchased that are not currently stock items. Contracts can be converted to quotations and from a quotation to a sales order/sale. The final variances on contracts are recorded and a final costing comparison report available. + +3. Significant work has also been done in conjunction with Secunia, the software security testing people, who have scruitinised webERP for security vulnerabilities. Their findings were useful in identifying scripts that needed to be changed. All identified weaknesses have now been removed. + +4. Prices can now be set for a period - with start and end date, to allow for promotional periods where the price should revert back and can be set ahead of time. + +5. Counter Sales functionality to allow sales to be processed to a default cash sales account and receipt of cash processed at the same time. This avoids having to enter a sales order, confirm the dispatch to invoice, the also entering the receipt as separate process and effectively enables a kind of point of sale system for each inventory location. + +6. A significant push has been made to try to reduce the number of bugs, with a great deal of testing from all quarters. + +The change log shows descriptions and dates of all changes made. + Installation instructions are in the file INSTALL.txt in the doc directory. It is important to read the INSTALL.txt file in its entirety before proceeding. A printout is recommended. The user documentation contains a wealth of information and is installed under the doc/Manual directory in html format. Links to it are available from the application itself. Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-03-26 03:33:53 UTC (rev 4517) +++ trunk/includes/ConnectDB.inc 2011-03-26 22:11:47 UTC (rev 4518) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.03.4'; //must update manually every time there is a DB change +$Version='4.03.5'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/ConnectDB_mysqli.inc =================================================================== --- trunk/includes/ConnectDB_mysqli.inc 2011-03-26 03:33:53 UTC (rev 4517) +++ trunk/includes/ConnectDB_mysqli.inc 2011-03-26 22:11:47 UTC (rev 4518) @@ -14,19 +14,13 @@ } global $db; // Make sure it IS global, regardless of our context $db = mysqli_connect($host , $dbuser, $dbpassword,$_SESSION['DatabaseName'], $mysqlport); +$result=DB_query('SET sql_mode = ANSI', $db); -//printf("tried making mysql-i Connection.\n"); -//$varabc = mysqli_client_encoding($db); -//printf("client encoding is %s\n", $varabc); //this statement sets the charset to be used for sending data to and from the db server //if not set, both mysqli server and mysqli client/library may assume otherwise mysqli_set_charset($db, "utf8"); -//$varabc = mysqli_client_encoding($db); -//printf("client encoding is %s\n", $varabc); - - /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); @@ -78,7 +72,6 @@ $result=mysql_query($SQL,$Conn); */ - $result=mysqli_query($Conn, $SQL); $_SESSION['LastInsertId'] = mysqli_insert_id($Conn); Modified: trunk/sql/mysql/upgrade3.11.1-4.00.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-03-26 03:33:53 UTC (rev 4517) +++ trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-03-26 22:11:47 UTC (rev 4518) @@ -834,5 +834,5 @@ ALTER TABLE locations ADD cashsalebranch varchar(10) DEFAULT ''; ALTER TABLE `locations` CHANGE `cashsalecustomer` `cashsalecustomer` VARCHAR( 10 ) DEFAULT ''; UPDATE config SET confvalue='4.03.3' WHERE confname='VersionNumber'; -INSERT INTO `weberpdemo`.`scripts` (`script`, `pagesecurity`, `description`) VALUES ('Z_ChangeSupplierCode.php', '15', 'Script to change a supplier code accross all tables necessary'); -UPDATE config SET confvalue='4.03.4' WHERE confname='VersionNumber'; \ No newline at end of file +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('Z_ChangeSupplierCode.php', '15', 'Script to change a supplier code accross all tables necessary'); +UPDATE config SET confvalue='4.03.5' WHERE confname='VersionNumber'; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |