Welcome Guest, Not a member yet? Register   Sign In
Active Record & Bind Variables
#1

[eluser]Relexx[/eluser]
Does Active record use bind variables, or does it generate full text sql every time?
#2

[eluser]TheFuzzy0ne[/eluser]
The SQL is generated dynamically, otherwise there would be empty WHERE/LIKE/JOIN (etc) clauses, which would cause a database error.
#3

[eluser]Relexx[/eluser]
yes but is it generated as
Code:
select * from emp where emp_id = ?

then ? passed in at execution time or
Code:
select * from emp where emp_id = 1
#4

[eluser]Colin Williams[/eluser]
Not sure all database drivers support bind variables. You could probably build bind variable queries with AR, but it's not going to do it automatically.




Theme © iAndrew 2016 - Forum software by © MyBB