rhodesiascout
Programmer
I seem to have a problem with my queries
I have 2 tables with 2 columns each as you can see below.
auto moto
code time code time
a1 20001201 b1 20001203
a2 20001204 b2 20001206
a3 20001209 b3 20001210
now i want to make a query that searches both tables and returns me the code of the most recent date.That is , it must return in this case b3.
Here is what i write but it keeps coming out wrong:
$query = "SELECT auto.code,moto.code FROM auto,moto WHERE auto.time>moto.offer ";
I have 2 tables with 2 columns each as you can see below.
auto moto
code time code time
a1 20001201 b1 20001203
a2 20001204 b2 20001206
a3 20001209 b3 20001210
now i want to make a query that searches both tables and returns me the code of the most recent date.That is , it must return in this case b3.
Here is what i write but it keeps coming out wrong:
$query = "SELECT auto.code,moto.code FROM auto,moto WHERE auto.time>moto.offer ";