我想以codeigniter Active Record的形式编写下面的mysql查询
select c.*
from code c
left join code_like l on c.id = l.code_id
group by c.id
order by count(*) desc
Run Code Online (Sandbox Code Playgroud)
我正在尝试下面的查询,但如何添加 order by count(*) desc
$this->db->select('*');
$this->db->from('code');
$this->db->join('code_like', 'code.id = code_like.id');
$this->db->group_by("code.id");
$query = $this->db->get();
Run Code Online (Sandbox Code Playgroud) 如何在mouseout事件发生时停止time()?
`<div id="j" style="height:50px; width:50px; background-color:red;">Hello</div`>
$("#j").mouseenter(function(){
var count = 3;
var counterIncrement=1;
setInterval(timer, 1000);
function timer() {
count = count+counterIncrement;
if (count == 3 ) {
counterIncrement = +counterIncrement;
}
console.log(count);
}
});
Run Code Online (Sandbox Code Playgroud)
当mouseout再次出现时我想重置timer()函数mousein然后开始count = 3