List for SQL questions?

From: Date: Sat, 24 Mar 2001 05:40:09 +0000
Subject: List for SQL questions?
Groups: php.db 
Request: Send a blank email to php-db+get-7746@lists.php.net to get a copy of this message
Anyone knows a list for discussion SQL questions? On the off chance that this *is* an appropriate list here goes: I want to select tickets from two tables that registers support tickets and events related to the ticket. No problem. Tickets go through various stages, REGISTERED, OPEN, CLOSED in events one ticket can have several entries with one of all three stages on each row. And can have a technician assigned (field gives username) or be not yet assigned to someone (Not Assigned). Now, I want to select ONLY the ticket that meets Registered *AND* Not Assigned. And this should be the final status of the ticket. (All tickets may have this status at one time or another). I've tried: "SELECT ticket.t_id, t_client, t_summary, e_assignedto, e_status FROM ticket, events WHERE e_status = 'REGISTERED' AND e_assignedto = 'Not Assigned' AND ticket.t_id = events.t_id"; This gives me ALL hits on this string. Including tickets that have had the desired status but is now assigned to someone. Any suggestions? I'm using MySQL as a database. Apologies if this is an unappropriate list - and grateful for pointers to the correct forum. M.

« previous php.db (#7746) next »