Advertisement
Advertisement
| 08.26.2008 at 12:15PM PDT, ID: 23679747 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: |
$sqlSuccess = "Y";
include 'includes/db_connection.php';
$result = mysql_query("SET AUTOCOMMIT=0");
if (!$result) { $sqlSuccess = "N";}
$result = mysql_query("START TRANSACTION");
if (!$result) { $sqlSuccess = "N";}
$SQL_Select="SELECT voucher_no FROM NEXT_VOUCHER_NO WHERE region='$regionCD'";
echo "Vchr Number Select:",$result, "<br>";
$result=mysql_query($SQL_Select) or die ('SELECT voucher_no table failed: ' . mysql_error() .mysql_errno() .mysql_errno() ."<br>");
if (!$result) { $sqlSuccess = "N";}
$row = mysql_fetch_row($result);
$vchrID = $row[0] ;
$nextVchrID = $vchrID + 1;
$SQL_Update = "UPDATE next_voucher_no SET voucher_no= $nextVchrID WHERE region='$regionCD'" ;
$result = mysql_query($SQL_Update) or die ('UPDATE voucher_no table failed: ' . mysql_error() .mysql_errno() .mysql_errno() ."<br>");
if (!$result) { $sqlSuccess = "N";}
echo "Vchr Number Update:",$result, "<br>";
$SQL_Insert = "INSERT into INVOICE values ('01', '$coCD', '$vchrID', '$vndrNo','$invNo', '$invDateWk', '$payTerms',
'$dueDateWk', '$grossAmt', '$invFrtAmt', '$invDscntAmt', '$invOtherAmt', '$invNetAmt', '$poNo', NOW())";
echo "INSERT INVOICE table: ", $SQL_Insert, "<br>";
$result = mysql_query($SQL_Insert) or die ('Insert into invoice table failed: ' . mysql_error() .mysql_errno() .mysql_errno() ."<br>");
if (!$result) { $sqlSuccess = "N";}
echo "INSERT INVOICE table Result",$result, "<br>";
$SQL_Insert = "INSERT into INVOICE_LINE values ($coCD', $vchrID', '$dist_line_no', '$dept1', '$bu1', '$acct1', '$proj1', '$task1', '$amt1')";
echo "INSERT INVOICE_LINE table: ", $SQL_Insert, "<br>";
$result = mysql_query($SQL_Insert) or die ('Insert into inv_line 1 table failed: ' . mysql_error() .mysql_errno() ."<br>") ;
if (!$result) { $sqlSuccess = "N";}
echo "INSERT INVOICE_LINE table Result:",$result, "<br>";
if ($sqlSuccess = "Y") {
$SQL = "COMMIT;";
$invoiceSaved="Y";
$result = mysql_query($SQL) or die('COMMIT failed: ' . mysql_error() .mysql_errno() ."<br>") ;
} else {
$SQL = "ROLLBACK;";
$result = mysql_query($SQL) or die('ROLLBACK failed: ' . mysql_error() .mysql_errno() ."<br>") ;
}
|