Placeholders in SQL

Dear All

Can I use placeholders in SQL statements? And if yes - how does this work. I would like to use the users ID to filter in a WHERE statement:

WHERE {thistable}.User_Id = 4169, and that works.

When I replace the fix number with a placeholder:

WHERE {thistable}.User_Id = '{$my->id}'. then that does not work.

Could you please tell me what is wrong.

Many thanks and best regards
René
 
Where do you use the SQL statement?
In e.g. databasejoin's "Data-where" it should do.
Make sure that you don't have spaces or unprintable characters in {$my->id}

You can enable "Debugging" in Fabrik Options and then append &fabrikdebug=1 to your URL to examine the generated queries.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top