MySQL Connector/Python 1.0.6 beta has been released

2012-09-07 Thread Kent Boortz
Dear MySQL users, MySQL Connector/Python v1.0.6 is a new version of the pure Python database driver for MySQL. This is the first in a series of beta releases that will introduce users to new features and changes. This release is feature complete, but as a non-GA release is not recommended for

Re: Create a VIEW with nested SQL

2012-09-07 Thread Mark Haney
On 09/06/2012 10:23 AM, h...@tbbs.net wrote: How about SELECT lights.*, machine.mach_name FROM lights JOIN machine USING (mach_id) /* ORDER BY date DESC */ GROUP BY mach_id ? With USING the fields mach_id from lights and machine become one unambiguous field mach_id. Does mach_id really occur

Re: Create a VIEW with nested SQL

2012-09-07 Thread Mark Haney
On 09/06/2012 10:23 AM, h...@tbbs.net wrote: SELECT lights.*, machine.mach_name FROM lights JOIN machine USING (mach_id) /* ORDER BY date DESC */ GROUP BY mach_id ? With USING the fields mach_id from lights and machine become one unambiguous field mach_id. Does mach_id really occur more

RE: Create a VIEW with nested SQL

2012-09-07 Thread Rick James
VIEWs have never been optimized well. Avoid them. Please provide SHOW CREATE TABLE for each table. Is `machine` used for anything other than the machine_name? Are you expecting one row? Here's another way: SELECT lights.*, ( SELECT mach_name FROM machine

Re: Create a VIEW with nested SQL

2012-09-07 Thread hsv
2012/09/07 09:11 -0400, Mark Haney All I need is the most recent record for EACH machine ID, THEN to pull the machine name from the table that has the name in it. Somehow I'm missing something incredibly obvious here. That is not certain. There is a fairly standard, fairly ugly means of