|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 09/12/2009 at 02:00PM PDT, ID: 24727211 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: |
$dbh = DBI->connect("dbi:mysql:database=dbxxxxxxxxx;host=localhost;mysql_socket=/tmp/mysql5.sock;user=dbxxxxxxxxxx;password=xxxxxxxx");
if ($Temp[1] eq "true")
{
$qst="DELETE FROM tbstock_items where `Stock #`=\"$Temp[0]\"";$dbh->do($qst);
$result="stockStatus^Stock Item Deleted";
}
else
{
$query{Avg_Markup}/=100;
if ($query{Archive} eq "true") {$query{Archive}="1";} else {$query{Archive}="0";}
foreach $vl (keys %query)
{
if ($vl ne "" && $vl ne "STOCKNO")
{
$vlname=$vl;
if ($vl eq "SubCategory") {$vlname="Sub-Category";}
$qst="update tbstock_items set `$vlname` = \"$query{$vl}\" where `Stock #`=\"$Temp[0]\"";$dbh->do($qst);
}
}
if ($DBI::errstr ne "") {$result="Error^Error:- $DBI::errstr"} else {$result="stockStatus^Data Saved";}
|
Advertisement