O'Reilly logo

PHP and MySQL Web Development, Third Edition by Laura Thomson, Luke Welling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Advanced MySQL Programming

In this chapter, you learn about some more advanced MySQL topics, including table types, transactions, and stored procedures.

Key topics covered in this chapter include

  • The LOAD DATA INFILE statement

  • Storage engines

  • Transactions

  • Foreign keys

  • Stored procedures

The LOAD DATA INFILE Statement

One useful feature of MySQL that we have not yet discussed is the LOAD DATA INFILE statement. You can use it to load table data in from a file. It executes very quickly.

This flexible command has many options, but typical usage is something like the following:

LOAD DATA INFILE "newbooks.txt" INTO TABLE books;

This line reads row data from the file newbooks.txt into the table books. By default, data fields in the file must be separated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required