i have a table called propAmenities
which holds two column amenity_id
and property_id
basically the table holds the foreign keys.
now i have to generate a PDO query using named placeholder for the below statement.
INSERT INTO propAmenities (amenity_id, property_id) VALUES (1, 1), (2, 1), (3, 1)
i tried using the following syntax but i am not sure if this will work.
$sth->$this->dbh->prepare('INSERT INTO
propAmenities
(amenity_id, property_id)
VALUES
(:amenity_id, :property_id),
(:amenity_id, :property_id),
(:amenity_id, :property_id)');
and for the above query i am not sure how do i use PDO's bindParam() ? how do i handle this situation Using PDO? am i using the wrong PDO's Placeholders?