-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello--
I'm developing a client for a box office that uses MySQL as the backend. I *was* using Access (yes, bad idea) but having converted to MySQL I'm finding that I have to rewrite some nested SELECTs that MySQL barfs on. Some of the queries are fairly complex. E.g., I'm wondering if it's possible to rewrite: SELECT RD.rid, ddate, ttime, sumSeats FROM (SELECT * FROM RunDates WHERE shid = ?) AS RD LEFT OUTER JOIN (SELECT NumberReservedSeats.rid, SUM(numSeats) AS sumSeats FROM RunDates, NumberReservedSeats WHERE RunDates.rid = NumberReservedSeats.rid AND shid = ? GROUP BY NumberReservedSeats.rid) AS NRS ON RD.rid = NRS.rid in something that MySQL can grok without having to use MySQL specific goodies. Ddate, ttime come from RunDates, and the two parameters are identical. Any thoughts? Is there any way to do joins like this (somewhat) cleanly? - -- Shamus I'm using the latest stable versions of MySQL & myODBC, BTW... -----BEGIN PGP SIGNATURE----- Version: Encrypted with PGP Plugin for Calypso iQA/AwUBPVsPVJhOW/ztyY5GEQKVGQCfQ202oIBX2arwhdw3b7ohW80CSzgAniUU Aqt2Bc7eMt4F0E6j7lrCUdmo =4zp3 -----END PGP SIGNATURE----- --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php