Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The reason of Phalcon_Model_Query method getResultset return null #24

Closed
dreamsxin opened this issue Jul 1, 2012 · 2 comments
Closed

Comments

@dreamsxin
Copy link
Contributor

file:dev/model/query.c
line:215
code:

PHP_METHOD(Phalcon_Model_Query, getResultset){



}

I find the method is empty .

@phalcon
Copy link
Collaborator

phalcon commented Jul 1, 2012

Hi dreamsxin, we're missing some work on that method, but nowadays it's not necessary to use it, the following code does exactly the same, returning a resultset:

$products = Products::find(array("name=?1", "bind" => "peanut")) 

regards,

@dreamsxin
Copy link
Contributor Author

Thanks phalcon,
"Phalcon_Model" is not support object relationship, must use a SQL statement for "Phalcon_Db".
Use object relationship can easy escape the input to prevent SQL injection.

ovr pushed a commit to ovr/cphalcon that referenced this issue Dec 25, 2013
Bug fixes and enhancements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants