Ok, so I have 2 tables in a mySQL DB. The format for the first is this. tutorialid int(10) title varchar(250) description varchar(250) date varchar(250) ID1 int(10) sitename varchar(250) URL varchar(250) ID2 int(10) image varchar(250) Code (markup): And for the second is site_id int(11) url varchar(255) title varchar(255) short_desc text indexdate date spider_depth int(11) required text disallowed text can_leave_domain tinyint(1) Code (markup): Now, what I need to know, is how can I get the info from the second DB into the first... Is there a bt of code that's like... SELECT 'site_id' FROM 'table2' INSERT into 'URL' in 'Table1' Know what I mean? I've been playing with this for a while and just can't do it. :| What would be even better would be if I could get all the info transferred in one go... Is that possible? Cheers Oliver
It's the other way around: insert into table1 (col11, col12) select col21, col22 from table2 Just make sure that the number of columns in the select and their position matches columns in the insert. Back up you data before doing giving this a try. J.D.
Wow awesome - thanks very much - that made complete sense... Now it works. My problem I guess was that I was going at it from completly the wrong side - no wonder the statements were confusing me Cheers