All my scripts are written in pdo-mysql . Now i am migrating to posgresql. I have been stuck in an insert query.
CREATE TABLE bus_spot
(
bus_id integer NOT NULL,
spot_loc_id integer NOT NULL,
bus_dir_id integer NOT NULL
)
php query used
$Bus_Id = 579;
$Bus_Dir_Id = 3;
$User_Loc_Id = 465;
$ISp_Res = $pdo->prepare("INSERT INTO bus_spot(bus_id, bus_dir_id, spot_loc_id) VALUES(?, ?, ?)");
$ISp_Res->execute(array($Bus_Id, $Bus_Dir_Id, $User_Loc_Id));
I am getting the following error when trying to insert this row
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: \"\""}