Timeline for answer to PDO with table prefix by Francis Avila
Current License: CC BY-SA 3.0
Post Revisions
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 19, 2012 at 19:22 | comment | added | Gabriel Santos |
Whit our without static members, I need to get prefix from database.. self::getPrefix('db1') and self::getPrefix('db2').
|
|
| Apr 19, 2012 at 19:18 | comment | added | Francis Avila | I'm not sure how you could think that writing an sql parser is easier than string interpolation. (Also, stop using static members! What if you want to use two different prefixes in the same application?) | |
| Apr 19, 2012 at 19:13 | comment | added | Gabriel Santos |
I think is more easy to parse.. I don't like to self::prepare('SELECT * FROM ' . self::getPrefix() . 'usuarios WHERE usuario = :username LIMIT 1');.. If I have a compelx query, this is like a non clean way to do this..
|
|
| Apr 19, 2012 at 19:06 | history | answered | Francis Avila | CC BY-SA 3.0 |