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.
“
"Add this in your component public function initialize(Controller $controller) { $this->controller = $controller;... read more
In simple words, class is a user defined datatype. Which have its... read more
Best method to change Laravel's default timestamps: Step 1: Override const in specific... read more
BrowserModifier:Win32/Neobar is malware which changes various browser data without notifying you. Windows... read more
Major Differences are: Git and Mercurial are the two most popular Distributed Version... read more
As per official bootstrap documentation about "sr-only CSS class": Always add labels Screen readers... read more
Way 1: Campare two numbers and print the greater one =IF((10>20),"TEN","TWENTY"); Way 2: Subtract... 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