I am trying to do the following query in Axon but can’t make it work. Using normal query it works –
SELECT user_name, email_id FROM ors_email_user WHERE email_sent=false LIMIT 5;
In Axon, I try to do the following –
$users = new Axon('ors_email_user');
$users->load(array('email_sent=:email_sent', array(':email_sent' => false)), '', 3);
while(!$users->dry()) {
echo 'here';
}
It never goes inside the while loop. What is wrong with the query? Is there a way where I can see what query is actually being formed.
I believe the load function only allows 3 parameters to be passed, where the third is the columns that should be ordered.
You should use the
find()orselect()function. From the website: