I've been trying for several days now to get a query to work correctly and need some help.
The situation: 2 tables, one containing a listing of sites and the other containing daily entries for those sites. I want to be able to query the tables and get a display which will list all sites and the entries for a specific day. Since not all sites will have an entry for a day, I want that site to appear with no information.
Like this:
Day: Nov. 9
Site
125 Main St. , (null)
125 State St. , 5
etc.
It only took me a few minutes to create the same scenario in Microsoft Access and writer a query that works :
SELECT dates.date, sites.site
FROM dates RIGHT JOIN sites ON dates.site = sites.site
WHERE (((dates.date)=#1/1/2009# Or (dates.date) Is Null));
But I can't get it to work in PHP. Either the sites with no information in the date table don't appear at all, or it reports no data from the date table at all.
Any help would be appreciated.