Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 11. Connecting to MySQL with PHP... > Using SQL to interact with a databas...

11.3. Using SQL to interact with a database

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.

11.3.1. Writing SQL queries

SQL syntax doesn't have many rules, and all of them are quite simple.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial