Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/08/2014, 08:09
xoceunder
 
Fecha de Ingreso: junio-2012
Ubicación: En el Mundo
Mensajes: 759
Antigüedad: 11 años, 10 meses
Puntos: 10
Respuesta: como agregar codigo a existente

gracias a todos ya logre hacerlo de esta manera

Código PHP:
Ver original
  1. function get_online_users(){
  2.     return Mysql::getInstance()
  3.         ->from('users')
  4.         ->count()
  5.         ->where(array('aid=' => $_SESSION['uid'],
  6.             'UNIX_TIMESTAMP(keep_alive)>' => 'UNIX_TIMESTAMP(now())-'.Config::get('watchdog_timeout')*2
  7.         ))
  8.         ->get()
  9.         ->counter();
  10. }