CodeIgniter Forums
how to get the log id sealed in the add_action of grocery crud? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7)
+--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13)
+--- Thread: how to get the log id sealed in the add_action of grocery crud? (/showthread.php?tid=69879)



how to get the log id sealed in the add_action of grocery crud? - azumamagus - 01-25-2018

Here a example, i want to click the button
https://imgur.com/a/F9tW9

and through the queryTest:

//call the function
$this->grocery_crud->add_action('Orçamento', '', 'admin/book', 'fa fa-file-pdf-o',array($this,'queryTest'));


//function
public function queryTest($primary_key ){

          $query =  $this->db->query('SELECT orcamento.data,produto.descricao
                                                            FROM  orcamento 
                                                            left join orcamento_x_produto on orcamento.idorcamento =                       orcamento_x_produto.idorcamento
                                                            left join produto on produto.idproduto = orcamento_x_produto.idproduto
                                                            where orcamento.idorcamento = '.$primary_key);




I want get the id to do SELECT with WHERE on DATABASE

Can help me?