Skip to content

Instantly share code, notes, and snippets.

@juanwilde
Created November 13, 2015 10:33
Show Gist options
  • Save juanwilde/ebe8e0088365b31bb167 to your computer and use it in GitHub Desktop.
Save juanwilde/ebe8e0088365b31bb167 to your computer and use it in GitHub Desktop.
Sql
public function getCustomers()
{
$customers = $this->_db->query('select c.*, ctrl.seen, ctrl.date as edited from customers c, control ctrl where c.id = ctrl.customer_id and ctrl.user_id = ' . Session::get('id_user') . ' order by ctrl.date desc, c.date desc');
return $customers->fetchAll(PDO::FETCH_ASSOC);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment