Last modified: 2011-11-25 07:42:58 UTC
Database::update and Database::select should either auto-alias table names to their non-prefix version, or add the prefix to other fields. In the case of updates, if you put a table name in the 'vars' and 'conds' you have to prefix it yourself. I assume the same applies to other methods and parameters. I'm not sure, but this may be solved by say in the FROM making it do: `{$prefix}page` AS `page`. As an example. That way people can just use the unprefixed table names everywhere, and based on the $tables parameter it assigns proper table prefixes (as it already does).
18:33 < finlay> Reedy: no I don't propose prefixes vars and conds 18:33 < finlay> Reedy: I propose to make the FROM look like in my case: FROM `td_page` AS `page` 18:33 < finlay> then all the other names in the vars and the WHERE and GROUP BY line up to the non-prefixed name 18:33 < finlay> so I can hapily use `page`. everywhere 18:33 < finlay> or whatever the table names are 18:33 < finlay> so whatever does the prefixes of $tables in the first place 18:34 < finlay> if the user did not specify a table alias for a given table 18:34 < finlay> make it default-alias it to the non-prefixed name If the user aliases `td_page` to `blah` then they will have to use `blah` everywhere. If they don't specify an alias, it will alias the table from `td_page` to `page`... assuming 'td_' was my table prefix. It should be an elegant solution that fixes it for everyone involved and makes developers happy.