Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

SELECT a column in ORM

Assume there is a table called users, and it has id,name,email fileds . this code: $info = Users::find(array( "name = 'vandad' ") ); I am not sure about above code what the exact form of SQL command is. I just want to SELECT email field but it seems the above code SELECT all fields firstly.

How can I SELECT specific a field through ORM architecture?



I've found out the answer : I should have use $info = Users::find(array( "columns" =>"email", "name = 'vandad' " )); When using this option an incomplete object is returned, here is email.

I was wondering how to do this, thank you man! :D