[eluser]jedd[/eluser]
This is surreal.
What are the primary keys on these two tables? From my understanding, the order of delivery of data from a RDBMS is not guaranteed, absent an ORDER BY clause, and with your ID fields not matching, I'm guessing they don't necessarily match row-by-row between the two tables, either?
How many rows do you have, btw?
I can't think of any SQL way of doing this - but I'm no SQL guru - so you might have to pull these data into PHP and combine them there, and pump them back out to whatever source (.csv, txt, or back to SQL) that you want.
How sure you are that when you select * from each of the two tables, that the results actually do align with each other? I mean, given there's no way to correlate the two separate sets of data, there's no visual clues as to whether gary is 45 with a surname of moore and a mid of ... etc.
Actually, in what way do you believe this is related to CodeIgniter?