Database API
Displaying 1 - 5 of 5Database Insert examples
If you’re building a Drupal 10 website, you’ll probably need to work with a database at some point. Whether you’re retrieving data from the database or making changes, you’ll need to use SQL queries.
An insert query adds new data to a database table.
how to check if table exist in update procedure
In Drupal 8/9, you can programmatically check if a specific table name exists in the database using the schema()->tableExists() method provided by the database API.
Schema Data Types
The following table shows all the legal combinations of the 'type' and 'size' fields of a column specification along with the underlying database data types used by each combination.
As of Drupal 7, MySQL, PostgreSQL, and SQLite data types are supported in Drupal core.
Drupal 6 core supports MySQL and PostgreSQL.
Database API
Drupal.org gives you good HELP and documentation, from time to time I find myself reading the same article more than once in search of my desired example, so I decided to copy the documentation I need and use and update them with more examples with time.
If you have an important example, please be a member of this site, and add your example in the comments.
