I'm trying to select and print data from two different tables.
The reason the data is in different tables is for use in other parts of my site (makes life way easier). But on one particular page I just want to get the data from both tables and print it all out.
Once I can do that I want to order it by a date column (so it doesn't matter which table it's from the newer one will come first).
I have tried something like:
but it seems to print out repetitions randomly :S
"SELECT id.table1, id.table2 FROM table1, table2"
I am calling it all through php, I normally use something like
Any way I can do this? The simpler the better as I really like to understand what I'm doing
while($row = mysql_fetch_array($sql_query))
echo "the data from the row 'id' is: " . $row['id'];