[PHP-DB] Efficient way to access MS SQL server

2008-01-30 Thread charlie
Currently using ODBC to connect to MS SQL server 2005. Profiling shows that to fetch many rows requires a cursor based fetch of each record - a round trip to SQL server for each. I would like to use some driver/interface from PHP to SQL server that would get all rows in one round trip, or at le

[PHP-DB] A little SQL help

2008-01-30 Thread Bastien Koert
Hi All, Got myself stuck in a little sql here and can't seem to work out what I am doing wrong SELECT DISTINCT (tour.record_id), tour.event_start_date, tour.event_end_date, tour.event_name,CASE WHEN result is NULLTHEN 'N/A'ELSE angler_results.resultEND CASE FROM tourLEFT OUTER JOIN a

Re: [PHP-DB] A little SQL help

2008-01-30 Thread Chris
Bastien Koert wrote: Hi All, Got myself stuck in a little sql here and can't seem to work out what I am doing wrong SELECT DISTINCT (tour.record_id), tour.event_start_date, tour.event_end_date, tour.event_name,CASE WHEN result is NULLTHEN 'N/A'ELSE angler_results.resultEND CASE FROM to