[PHP] php - mysql query issue

2006-09-15 Thread Dave Goodchild
Hi all. I am building an online events listing and when I run the following query I get the expected result set: SELECT events.id AS eventid, name, postcode, start_time, dates.date FROM events, dates_events, dates WHERE dates_events.event_id = events.id and dates_events.date_id = dates.id AND

Re: [PHP] php - mysql query issue

2006-09-15 Thread Brad Bonkoski
Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure and table data... -B Dave Goodchild wrote: Hi all.

Re: [PHP] php - mysql query issue

2006-09-15 Thread Dave Goodchild
On 15/09/06, Brad Bonkoski [EMAIL PROTECTED] wrote: Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure

Re: [PHP] php - mysql query issue

2006-09-15 Thread Andrei
Also you should check if dates.date is a DATE type, not DATETIME. Lost some time on that when I wanted to select enregs for a specific date, field was DATETIME and I was querying `date` = '2006-01-01'... :p Andy Dave Goodchild wrote: On 15/09/06, Brad Bonkoski [EMAIL PROTECTED]

Re: [PHP] php - mysql query issue

2006-09-15 Thread Richard Lynch
On Fri, September 15, 2006 7:35 am, Dave Goodchild wrote: Hi all. I am building an online events listing and when I run the following query I get the expected result set: Any ideas why not? I know it's more of a mySQL question so apologies in advance! Well, you'd have to tell us what's in