Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 456
AJM.MARTINEZ Avatar asked Feb 15 '26 08:02

AJM.MARTINEZ


1 Answers

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();
like image 195
romaninsh Avatar answered Feb 17 '26 21:02

romaninsh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!