energylab / gacela

An open-source PHP Data Mapper ORM and Domain Framework built on PHP 5.3
gacelaphp.com
MIT License
29 stars 6 forks source link

Escaped variable syntax #6

Closed bmidget closed 12 years ago

bmidget commented 12 years ago

Seems like it would be nice to have access to escaped variables anywhere in the query builder, not just the "where" statement.

My suggestion is to allow it as a third parameter in the query():

$query_object->query($resource, $sql, array $variables);

It would replace all :variables anywhere in the query with escaped versions of the variables array passed as the third parameter.

noah-goodrich commented 12 years ago

This is done with the $query->bind(array $binds); method