tta013 Posted August 8, 2008 Share Posted August 8, 2008 Hello there, I am a new bie here... I was wondering how I could transfer the data from one table to another. I tried with the following but giving me an error message. Was wondering what I did wrong. SELECT * FROM `tbl_temp` WHERE 1 INSERT INTO `tbl_temp` ( `booking_id`, `club_id` ) SELECT 'Booking' ('booking_id`,'club_id`) FROM 'Booking' Thanks, Link to comment https://forums.phpfreaks.com/topic/118760-insert-into/ Share on other sites More sharing options...
mwasif Posted August 8, 2008 Share Posted August 8, 2008 This will SELECT the data from Booking table and INSERT into tbl_temp INSERT INTO `tbl_temp` ( `booking_id`, `club_id` ) SELECT booking_id, club_id FROM Booking Note: There is a difference between ' (single quote) and ` (backtick, above Tab key) Link to comment https://forums.phpfreaks.com/topic/118760-insert-into/#findComment-611731 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.