in reply to Re^3: fetchrow/all vs selectrow/all
in thread fetchrow/all vs selectrow/all

Interesting, I use placeholders 100% of the time when INSERTing, but didn't know there was an advantage to doing it with SELECT. My understanding was that placeholders helped to avoid sql injections.

So far, I'm hearing little difference in fetch vs select, other than the repeated-prepare-scenario.


—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Replies are listed 'Best First'.
Re^5: fetchrow/all vs selectrow/all
by Aristotle (Chancellor) on Nov 26, 2005 at 01:54 UTC

    Well, yes, if you only execute the query once, then there’s no difference, because select(row|all) are convenience functions for… executing the query once.

    SQL injection can’t happen only on INSERT, though. Any query using user data in some shape or fashion is subject to manipulation.

    Makeshifts last the longest.