php - insert multiple duplicate rows in a same table mysql -
i have table of amenities in data inserted 1 one each property , want create duplicate of property gives error.
$sql = "insert property ($column_str) select $column_str property pid = $duplicate_id";
it works single row when insert property id doesn't work. other query
$sql = "insert apartment_amenity (`property_id`,`amenity_id`) select `1495`,`amenity_id` apartment_amenity `property_id` = 1494"
use single quotes '
wrap 1495 instead of tick marks `
Comments
Post a Comment