|
From: <dai...@us...> - 2017-05-06 23:54:51
|
Revision: 7759
http://sourceforge.net/p/web-erp/reponame/7759
Author: daintree
Date: 2017-05-06 23:54:48 +0000 (Sat, 06 May 2017)
Log Message:
-----------
Andy Couling:Fixes to SQL to get table anmes per JanB forum post
Modified Paths:
--------------
trunk/MRPPlannedPurchaseOrders.php
trunk/MRPPlannedWorkOrders.php
trunk/MRPReschedules.php
trunk/MRPShortages.php
trunk/doc/Change.log
Modified: trunk/MRPPlannedPurchaseOrders.php
===================================================================
--- trunk/MRPPlannedPurchaseOrders.php 2017-04-17 14:54:04 UTC (rev 7758)
+++ trunk/MRPPlannedPurchaseOrders.php 2017-05-06 23:54:48 UTC (rev 7759)
@@ -6,7 +6,7 @@
include('includes/session.php');
//Maybe not ANSI SQL??
-$sql="SHOW TABLES WHERE Tables_in_" . $_SESSION['DatabaseName'] . "='mrprequirements'";
+$sql = "SELECT TABLE_NAME FROM information_schema.tables WHERE TABLE_SCHEMA = '" . $_SESSION['DatabaseName'] . "' AND TABLE_NAME = 'mrprequirements'";
$result=DB_query($sql);
if (DB_num_rows($result)==0) {
Modified: trunk/MRPPlannedWorkOrders.php
===================================================================
--- trunk/MRPPlannedWorkOrders.php 2017-04-17 14:54:04 UTC (rev 7758)
+++ trunk/MRPPlannedWorkOrders.php 2017-05-06 23:54:48 UTC (rev 7759)
@@ -1,12 +1,11 @@
<?php
/* $Id$*/
-
// MRPPlannedWorkOrders.php - Report of manufactured parts that MRP has determined should have
// work orders created for them
include('includes/session.php');
-$sql="SHOW TABLES WHERE Tables_in_" . $_SESSION['DatabaseName'] . "='mrprequirements'";
+$sql = "SELECT TABLE_NAME FROM information_schema.tables WHERE TABLE_SCHEMA = '" . $_SESSION['DatabaseName'] . "' AND TABLE_NAME = 'mrprequirements'";
$result=DB_query($sql);
if (DB_num_rows($result)==0) {
$Title=_('MRP error');
Modified: trunk/MRPReschedules.php
===================================================================
--- trunk/MRPReschedules.php 2017-04-17 14:54:04 UTC (rev 7758)
+++ trunk/MRPReschedules.php 2017-05-06 23:54:48 UTC (rev 7759)
@@ -1,13 +1,11 @@
<?php
-
/*$Id$ */
-
// MRPReschedules.php - Report of purchase orders and work orders that MRP determines should be
// rescheduled.
include('includes/session.php');
-$sql="SHOW TABLES WHERE Tables_in_" . $_SESSION['DatabaseName'] . "='mrprequirements'";
+$sql = "SELECT TABLE_NAME FROM information_schema.tables WHERE TABLE_SCHEMA = '" . $_SESSION['DatabaseName'] . "' AND TABLE_NAME = 'mrprequirements'";
$result=DB_query($sql);
if (DB_num_rows($result)==0) {
$Title='MRP error';
Modified: trunk/MRPShortages.php
===================================================================
--- trunk/MRPShortages.php 2017-04-17 14:54:04 UTC (rev 7758)
+++ trunk/MRPShortages.php 2017-05-06 23:54:48 UTC (rev 7759)
@@ -1,5 +1,4 @@
<?php
-
/*$Id$ */
// MRPShortages.php - Report of parts with demand greater than supply as determined by MRP
@@ -6,7 +5,7 @@
include('includes/session.php');
//ANSI SQL???
-$sql="SHOW TABLES WHERE Tables_in_" . $_SESSION['DatabaseName'] . "='mrprequirements'";
+$sql = "SELECT TABLE_NAME FROM information_schema.tables WHERE TABLE_SCHEMA = '" . $_SESSION['DatabaseName'] . "' AND TABLE_NAME = 'mrprequirements'";
$result=DB_query($sql);
if (DB_num_rows($result)==0) {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2017-04-17 14:54:04 UTC (rev 7758)
+++ trunk/doc/Change.log 2017-05-06 23:54:48 UTC (rev 7759)
@@ -1,5 +1,6 @@
webERP Change Log
+7/5/17 Andy Couling/Janb: Fixes to MRP scripts SQL to get table names per forum post http://www.weberp.org/forum/showthread.php?tid=2448
13/4/17 RChacon: Rename includes/footer.inc, includes/header.inc and includes/session.inc to includes/footer.php, includes/header.php and includes/session.php.
09/4/17 RChacon: In UserSettings.php, add options to turn off/on page help and field help. In WWW_Users.php, improve code and documentation.
30/3/17 RChacon: In ManualContents.php, fix checkbox showing and do some improvements.
|