On 18/01/2008, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote:
> ...and now the contents of $columns (SQL variable) in the statement above,
> has been replaced with the contents of $columns (TCL variable) - because the
> variable names are "compatible". So - that was my assumption - we've got now:
>
> { SELECT column1, column2, column3 FROM some_table }
>
> ...which seems to be quite legal SQL statement.
>
>
> It seems, there's something I'm still missing(?).Hi Zbigniew, Parameter binding is not the same as substitution into a raw sql string. SQLite prepares an SQL string akin to "SELECT ? FROM some_table;", then satisfies the place holder by having the text "column1, column2, column3" ($columns ) bound to the prepared statement. Thus the results are from executing the SQL SELECT 'column1, column2, column3' FROM some_table; which I believe tallies with the results you see. Rgds, Simon ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

