I need to run an insert and a simultaneous update, but I'm using only insert test to catch errors.
The PDO does not report the error when I define a correct and an incorrect table, but if I run a query to select one incorrect table the error is reported.
I do not have enough knowledge to solve this problem, i really need to execute two queries together
Thank you.
$db-> setAttribute( PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION );
try{
$stmt = $db-> prepare( "INSERT INTO test ( name ) values( 'new name' );
INSERT INTO xast ( xame ) values( 'new name' );" );
$stmt->execute();
}catch( PDOException $e ){
print_r( $e );
}
try{
$stmt = $db-> prepare( "INSERT INTO xast ( xame ) values( 'new name' );" );
$stmt->execute();
}catch( PDOException $e ){
print_r( $e );
}
**Column not found: 1054 Unknown column 'xame'**