MrTV
asked on
varia ble problem
when i run the code below it not work but when I cahnge $Code02 to 12423 it work But I try to check value of $Code02 by echo it get 12423
The code that not work
if($submit04)
{
echo $Code02 ;
include ("aut.inc");
$link_id1 = db_connect($default_dbname );
$sql = "UPDATE `sellhead`
SET `PayDate` ='$datedue01'
WHERE Code= '$Code02' ";
$result = mysql_query($sql,$link_id1 );
mysql_close($link_id1);
After I change $Code02 to 12423 it can up date database
$sql = "UPDATE `sellhead`
SET `PayDate` ='$datedue01'
WHERE Code= '12423 ' ";
The code that not work
if($submit04)
{
echo $Code02 ;
include ("aut.inc");
$link_id1 = db_connect($default_dbname
$sql = "UPDATE `sellhead`
SET `PayDate` ='$datedue01'
WHERE Code= '$Code02' ";
$result = mysql_query($sql,$link_id1
mysql_close($link_id1);
After I change $Code02 to 12423 it can up date database
$sql = "UPDATE `sellhead`
SET `PayDate` ='$datedue01'
WHERE Code= '12423 ' ";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you try my 2 suggestions?
ASKER
yes i try it not work
The feild PayDate is date
and varia ble $datedue01 like 20060519
I try but it put 0000-00-00 00:00:00 in field PayDate
The feild PayDate is date
and varia ble $datedue01 like 20060519
I try but it put 0000-00-00 00:00:00 in field PayDate
The the problem is the $datedue01 variable, which needs to be in this format: 1997-10-04 22:23:00
$datedue01 = '2006-05-19';
and the query will work
$datedue01 = '2006-05-19';
and the query will work
Try putting var_dump($sql); on the line right before you execute the query. Then paste what's printed here.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER