in reply to Re: Module Design Review -- DB mini language
in thread Module Design Review -- DB mini language

I agree with you on the whitespace, but I think that, while it may increase typing, spelling out your joins is much cleaner and easier to read (if the db that you are using support it).
SELECT words.id, words.definition FROM stock JOIN languages ON (stock.languageID = languages.id) JOIN stockmatch ON (stockmatch.stockID = stocks.id) JOIN words ON (stockmatch.wordID = words.word_id) JOIN types ON (words.typeID = types.id) WHERE stock.word = :stock_word AND language.name = :language_name AND type.name = :type_name
And if you are joining two tables on a column that has the same name in both tables you can:
SELECT * FROM table_one JOIN table_two USING (join_column)