<?php
class Model_User extends \Orm\Model {
protected static $_primary_key = array('user_id');
protected static $_properties = array('user_id', 'username');
}
<?php
Class Controller_Users extends \Controller_Base_Public {
public function before() {
parent::before();
}
public function action_check() {
$query = Model_User::find()->where('username', 'wwwe');
$total = $query->count();
echo $total;
}
}
public function ajax_check(){
echo 1;
}
$this->auto_render = false;Any output should not be echo'ed though, add it to $this->response->body from your controller. I also think I know what causes your Orm problem, for now this will probably solve it:
$query->count('user_id');
Can you make a bugreport out of it on Github? It looks like you're new here. If you want to get involved, click one of these buttons!