Welcome Guest, Not a member yet? Register   Sign In
Active Record + Join SQL Problem
#11

[eluser]darkhouse[/eluser]
I must correct my initial statement. There actually IS a way to do this with SQL, and I didn't realize it. You can use a UNION. It's pretty simple really:

Code:
SELECT * FROM table1
UNION
SELECT * FROM table2
UNION
SELECT * FROM table3
UNION
SELECT * FROM table4
ORDER BY timestamp

Now, this should combine everything and order them all by the timestamp, BUT it might also combine other columns that shouldn't necessarily be combined. I'm not sure how to fix that exactly, just wanted you to be aware of it if it might be a problem for you.


Messages In This Thread
Active Record + Join SQL Problem - by El Forum - 02-18-2009, 06:26 PM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 02:19 AM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 03:49 AM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 06:03 AM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 07:13 AM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 01:49 PM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 02:21 PM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 02:26 PM
Active Record + Join SQL Problem - by El Forum - 02-19-2009, 02:52 PM
Active Record + Join SQL Problem - by El Forum - 02-20-2009, 08:51 AM
Active Record + Join SQL Problem - by El Forum - 02-28-2009, 03:50 PM
Active Record + Join SQL Problem - by El Forum - 02-28-2009, 05:01 PM
Active Record + Join SQL Problem - by El Forum - 02-28-2009, 05:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB