Using PHP with MySQL

  • Frank M. Kromann


MySQL is a relational database engine/tool that allows developers to use something called Structured Query Language (SQL) to interact with the database. SQL can be used to perform two types of tasks. The first type is to create alter or drop objects in the database. The objects are tables, views, procedures, indexes, etc. The second type of commands is used to interact with the data by selecting, inserting, updating, or deleting rows in a table. A table can be compared to a spreadsheet with rows and columns. Each column has a name, a data type, and a length as well as other flags that define how data is handled. Although SQL is used by many different database systems, they do not all follow the same syntax or support the same features; however, most of them follow the standard called SQL92 with a number of custom features. One example of this is MySQL’s filed option called AUTO_INCREMENT. When this option is applied to an integer column in a table, the database will automatically assign a value to the column each time a row is added to the table unless the insert statement provides a value for the column. Other databases use DEFAULT UNIQUE (FrontBase) or IDENTITY() (SQL Server). Oracle databases require the creation of a sequence that is then used to create a unique value on insert. These differences make it difficult to write code that runs on different database systems.

Copyright information

© Frank M. Kromann 2018

Authors and Affiliations

  • Frank M. Kromann
    • 1
  1. 1.Aliso ViejoUSA

Personalised recommendations