"Until you execute it" is only true if you omit the prepare step. If you do a prepare
first all scalars are resolved at that point in time. After the prepare you can only
bind values to substitution parameters (if any), either through using one of the
bind_param functions or directly in the execute call.
I admit I'm counting beans here, but sometimes beans can be fairly important in
programming ...
Cheers,
Christian Sage
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet am: Montag, 25. Juni 2001 21:42
An: [EMAIL PROTECTED]
Betreff: Re: ? embed scalars in the sql
: Is it possible to embed a scalar into the sql such that the value of
: the scalar could represent a column name to report or a value to
: select by
Sure. The query's just a scalar string until you execute it.
Same goes for order by, group by, table names, or whatever. Just do
yourself a favor and trap the errors that come back from the database
interface (DBI, hopefully).
-- tdk