AJM.MARTINEZ AJM.MARTINEZ - 3 months ago 9
MySQL Question

Creating a database query using dsql

Is it possible to make a query using any of the methods of dsql() ?

something like:

$dq=$this->api->db->dsql()->execute('insert into table xx (field1,field2) values ('a','b')');


Thanks

Answer

DSQL is now refactored as a Separate Library: https://git.io/dsql

$this->api->db->dsql()->table('table')->set('field1','a')->set('field2','b')->do_insert();

Naturally you can also use

$this->api->db->dsql()->table('table')->set($associative_array)->do_insert();
Comments