RE: [PHP-DB] Problem with SQL query on several tables

2001-11-27 Thread Matt Williams
> > Thanks, > > but I want wo JOIN data from three tables and then to order > > all data by "datestamp". There must be more than one column called datestamp, this is why mysql is telling you it's ambiguous. So you need to tell it which table's datestamp column you wish to use. for example your n

Re: [PHP-DB] Problem with SQL query on several tables

2001-11-27 Thread Indioblanco
It sounds to me like what you're trying to do is APPEND data from three similarly structured tables into one entity ordered by a column common to all 3 tables called "datestamp". If I'm mistaken, then please ignore all of the following: Approach #1 (mysql) Create a temporary table with the col

Re: [PHP-DB] Problem with SQL query on several tables

2001-11-27 Thread Rosen
Thanks, but I want wo JOIN data from three tables and then to order all data by "datestamp". Can I Do It ? Thanks, Rosen Andrey Hristov wrote in message <071401c17759$f5873c80$0b01a8c0@ANDreY>... >Mysql says that in the join there are some columns with namer datestamp so you have to choose by

Re: [PHP-DB] Problem with SQL query on several tables

2001-11-27 Thread Andrey Hristov
Mysql says that in the join there are some columns with namer datestamp so you have to choose by which you want to order. Think about making LEFT JOIN. select * from f1 LEFT JOIN f2 ON f1.some_field=f2.some_field LEFT JOIN f3 ON f2.some_field=f3.some_field roder by f1.datestamp; Regards, Andrey