Preparing Queries: Bind Sql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Preparing Queries: Bind Sql

Post by raghavan20 »

I was studying some excerpt from a book and I came across binding sql.
1. How many of you use this concept of using placeholders in the sql statement and the input is/are passed later and which is/are processed and a new query string is formed for execution?

2. Can you give me some link where I can find more information/ discussion regarding the same?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Meaby you find more if you search for "prepared statements"

I usually use them via ADOdb (which has also emulation for those dbms that don't support it)
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

prepared statements seem to be faster as they are precompiled.
but think they are useful when we are going to use a same query several times across the application; sounds like useful when big applications are developed.
Post Reply