search for: media_format

Displaying 1 result from an estimated 1 matches for "media_format".

Did you mean: mediaformat
2009 Sep 16
3
find_by_sql - multiple selects, same statement SQL error
I''m trying to get the following statement to work using variable substitution (it works if hard-code the where (med_type) param in the inner SQL statement): med_type = ''game'' @mediaformats = MediaFormat.find_by_sql("select * from media_formats where media_formats.media_type_id = (select media_type_id from media_types where media_type = ?, :med_type) order by description") The error is generated by MySQL because the query it receives is: select * from media_formats where media_formats.media_type_id = (select media_type_id from med...