O'Reilly logo

Mastering phpMyAdmin 3.1 for Effective MySQL Management by Marc Delisle

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

Multi-statement queries

In PHP and MySQL programming, we can send only one query at a time using the mysql_query() function call. phpMyAdmin allows us to send many queries in one transmission, using a semicolon as a separator. Suppose we type the following query in the query box:

INSERT INTO author VALUES (100,'Paul Smith','111-2222');
INSERT INTO author VALUES (101,'Melanie Smith','222-3333');
UPDATE author SET phone='444-5555' WHERE name LIKE '%Smith%';

We will receive the following results screen:

Multi-statement queries

We see the number of affected rows through comments because $cfg['VerboseMultiSubmit'] is set to TRUE.

Let's send the same list of queries again and ...

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