How to run, execute insert query in Drupal 8
“There may be several other possible ways, but I know one simple one and sticked to it.
$db = \Drupal::database();
$db->insert($table_name)->fields($fields_array_key_value_pair)->execute();
Thats it.
“
“There may be several other possible ways, but I know one simple one and sticked to it.
$db = \Drupal::database();
$db->insert($table_name)->fields($fields_array_key_value_pair)->execute();
Thats it.
“
This can be achieved using a single query with join. We can... read more
Below code can be helpful $this->response->file($this->DIR.$file, array('download' => true, 'name' => "$file")); read more
Procedure is same for windows versions, xp, vista, windows 7, windows 8,... read more
Major Differences are: Git and Mercurial are the two most popular Distributed Version... read more
Have you ever read emailed somebody and spent time wondering whether they... read more
How to check laravel version: Step1: Find Application.php file in your app and... read more
Following Code is required for that: echo $this->Html->image("your_img.png", array( 'url' => array('controller' => 'some_controller',... read more
If you are a victim of Browser Modifier Virus ( malware ) Browser... read more
$this->session->mark_as_flash('item'); # Version 3.x only $this->session->mark_as_flash(array('item', 'item2')); # Version 3.x only Array to... read more
$this->db->insert('users', $data); # where $data is an array $insert_id = $this->db->insert_id(); # insert_id()... read more
Leave a Reply
You must be logged in to post a comment.