> > "SELECT *, Table1.ID AS _ID FROM Table1 LEFT JOIN Table2 ON > > Table2.ID=Table1.ID WHERE _ID=?1" and bind only the _ID > parameter in > > this case? > > This would work. > > > The issue is that I don't know beforehand what can be in that WHERE > > statement and how many parameters it might have - it's formed > > elsewhere. > > Parameters cannot change a structure of the query. If you > need to do this, then you have to build the query in a > string, with sprintf or similar, then prepare. Of course you > can still use parameters in place of any literals you may > need in the query.
Thank you for a quick reply - I was afraid that it wouldn't work like that :) I guess I'll need to revise the way these statements are built, which might be a good thing in the end after all. Dennis > > Igor Tandetnik > > > -------------------------------------------------------------- > --------------- > To unsubscribe, send email to [EMAIL PROTECTED] > -------------------------------------------------------------- > --------------- > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

