Re: [PHP] dropdown with two Sql query

2011-06-26 Thread Tamara Temple
On Jun 26, 2011, at 10:34 AM, Ashley Sheridan wrote: I don't think that MySQL requires the 'AS' in that context, I write queries like that without the 'AS' all the time. This is what i get for trying to be coherent on 2 hours sleep -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] dropdown with two Sql query

2011-06-26 Thread Ashley Sheridan
On Sun, 2011-06-26 at 10:29 -0500, Tamara Temple wrote: > On Jun 25, 2011, at 3:57 PM, asp kiddy wrote: > > > SELECT td.id_resultat,td.fld_email_id,email.fld_name_email > > FROM $table_db td > > JOIN $table_db_email email ON td.fld_email_id = email.id_email > > WHERE td.id_resultat = $id > > I

Re: [PHP] dropdown with two Sql query

2011-06-26 Thread Tamara Temple
On Jun 25, 2011, at 3:57 PM, asp kiddy wrote: This code works also but I don't know how I can include this second query in my menu... I'm not exactly sure what you want it to do -- perhaps you could mock up some sample output to show what you're expecting? If you are simply planning on r

Re: [PHP] dropdown with two Sql query

2011-06-26 Thread Tamara Temple
On Jun 25, 2011, at 3:57 PM, asp kiddy wrote: SELECT td.id_resultat,td.fld_email_id,email.fld_name_email FROM $table_db td JOIN $table_db_email email ON td.fld_email_id = email.id_email WHERE td.id_resultat = $id I see two small problems right away: > FROM $table_db td should read: FROM