$this->resultados = $this->db->select_limit("SELECT * FROM facturascli ORDER BY numero WHERE codagente=".$this->agente, FS_ITEM_LIMIT, $this->offset.";");
$this->resultados = $this->db->select_limit("SELECT * FROM facturascli ORDER BY numero WHERE codagente=".$this->agente, FS_ITEM_LIMIT, $this->offset);
$this->resultados = $this->db->select_limit("SELECT * FROM facturascli ORDER BY numero WHERE codagente=".$this->agente->codagente, FS_ITEM_LIMIT, $this->offset);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE codagente=13 LIMIT 200 OFFSET 0' at line 1
$this->resultados = $this->db->select_limit("SELECT * FROM facturascli ORDER BY numero WHERE codagente=".$this->agente->var2str($this->agente->codagente), FS_ITEM_LIMIT, $this->offset);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE codagente='13' LIMIT 200 OFFSET 0' at line 1
$this->agente = $this->user->get_agente();
$this->offset = 0;
$this->resultados = $this->db->select_limit("SELECT * FROM facturascli ORDER BY numero WHERE codagente=".$this->agente->var2str($this->agente->codagente), FS_ITEM_LIMIT, $this->offset);