I am using php 5.3 and MySQL 5.0
The php is installed using mysqli not pdo
So I cannot use pdo syntax
I have 3 prepared statements
1. one for look up
2. one for INSERT
3. one for UPDATE
The first two statements work fine and execute as they are suppose to.
I have tested the update statement on the MySQL workbench and it works just fine there. Also all the steps and results leading up to the UPDATE execute as expected.
The following code does not update the table record when executed. The $result is always equal to false. Any usable help will be appreciated.
The php is installed using mysqli not pdo
So I cannot use pdo syntax
I have 3 prepared statements
1. one for look up
2. one for INSERT
3. one for UPDATE
The first two statements work fine and execute as they are suppose to.
I have tested the update statement on the MySQL workbench and it works just fine there. Also all the steps and results leading up to the UPDATE execute as expected.
The following code does not update the table record when executed. The $result is always equal to false. Any usable help will be appreciated.
Code:
/* ------------------------- prepared update statement ------------------------- */ $updStmt = $db->prepare('update `time` set HOL=8.00,WEBUSER="'.$webUser.'",WEBDATE='.$webDate.',WEBADDEDIT ="Edit" where EMPNODATE = ?'); /* Bind our params */ $updStmt->bind_param('s',$empNoDate); /*execute updStmt*/ $result = $updStmt->execute(); if ($result == false ) { $fEdit.='~'.$c["EMPNO"]; }else{ $cEdit++; }
Comment