Skip to header Skip to main navigation Skip to main content Skip to footer
  • Log in
Home
DrupalVIP
Freelancer service with great care and enthusiasm.
  • Home
  • Products
  • Blog
  • Support
    • Dictionary
    • Drupal Resources
    • External Resources

Database API

Breadcrumb

  • Home
  • Database API

Database API

Displaying 1 - 5 of 5

Database Update examples

DrupalVIP Support

An update query changes data in an existing database table. 
Here’s an example of an update query in Drupal 10

Drupal Support
Drupal 10
Database API
Update
Code Example

Database Insert examples

DrupalVIP Support

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.

Drupal Support
Drupal 10
Database API
Insert
db_insert
Multi-Insert
Code Example
Connection

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.

Database API
Drupal 9
Code Example
Module Development
hook_update

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.

MySql
Module Development
Code Example
Schema Reference
Drupal Schema
Drupal
Drupal 7
PostgreSQL
Drupal 9
Database API

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.

Count Queries
Query Condition
Code Example
Drupal Reference
select query
API
Database API
Drupal 9
Subscribe to Database API

The Freelancer Assistance

Drupal Development

Drupal Development

Site Management

Site Management

Drupal Shared Space

Drupal Shared Space

Proactive Maintenance

Proactive Maintenance

Drupal Training

drupal training session

Fullstack Service

Fullstack Service
Review All Services

Buy Hourly Support

 

Drupal platform support for complex websites. The service includes support, training, troubleshooting, fixes, updates, tool creation and module building.
* Minimum order is for 5 hours of support
* For every 20 hours of order you will be entitled to an additional hour of support
* For every 50 hours of order you will be entitled to 5 additional hours of support

 

>> Payment <<

 
cards

מופעל על-ידי paypal

Legal

  • Home
  • Contact
  • Products

Footer menu

  • Home
  • Contact
  • Products

Copyright © 2026 DrupalVIP project of Automatic Frameworks - All rights reserved

Developed and Maintain by Jonathan Ben Hur Freelancer