Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As you have just seen, PHP connects to the database, sends the query, and receives the results; but the query itself needs to be written in SQL. Although SQL is a common standard, there are many dialects of SQL. Each database vendor, including MySQL, has added extensions to the standard language. These improve efficiency and functionality, but are usually incompatible with other databases. The SQL in this book works with MySQL 4.1 or later, but it won't necessarily transfer to Microsoft SQL Server, Oracle, or another database.
SQL syntax doesn't have many rules, and all of them are quite simple.