SQL

A database can be used to store large amounts of data. It has the advantage over XML, the plain text version of the data, that it can be encrypted and is password protected.

To query the database, we use the Simple Query Language.

SQL code can be executed inside PHP code, whenever the PHP script demands interaction with the database, for instance when data needs to be fetched, stored, changed, removed from the database.

To store/insert e.g. a message in a database table, we could use this mixed PHP/SQL code:

previous: PHP | back to begin