in reply to A DBI Query Binding Pitfall

I never quite understood why people bind table names. The whole purpose of binding variables is to deal with quoting issues, and, in more advanced databases, prepare a query plan that will allow subsequent execute() calls to execute faster. Table names don't have quoting problems, and you certainly can't create a query plan without a table name.

Do you know why people do this? Is it just exuberance with a particular way of doing things?

Chris
M-x auto-bs-mode

Replies are listed 'Best First'.
Re: Re: A DBI Query Binding Pitfall
by dws (Chancellor) on Sep 13, 2002 at 18:09 UTC
    I never quite understood why people bind table names. Do you know why people do this? Is it just exuberance with a particular way of doing things?

    I suspect it's because they've been told that hand-build queries are risk, and binding is good, but they don't understand the limitations.

    It's sort of like being told "Go that way" without being told "But look out for that puddle" or knowing to look out for one.