[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug
Hi,
> In using the application there is one feature I see missing.
>
> 1. Inability to execute multiple statements in sequence.
If you are talking about the MySQL command-line client program, then you
definitely can execute multiple statements at once, just by making sure you
terminate each statement with ';', '\g' or '\G'. For example:
mysql> select 1 + 1; select 2 + 2;
+-------+
| 1 + 1 |
+-------+
| 2 |
+-------+
1 row in set (0.00 sec)
+-------+
| 2 + 2 |
+-------+
| 4 |
+-------+
1 row in set (0.00 sec)
You can even create a 'script' of SQL statments in a text file to be
executed in sequence by the MySQL client program. Simply run MySQL like
this:
$ mysql -u username -p databasename < scriptfile.sql
Or, you can run the 'script' from within the program by using the 'source'
command. Type 'help' within the client for details on this and other handy
commands.
However, if you're talking about a third-party client application or about
trying to do this from a PHP script (via the mysql_query() function) then I
doubt it will be possible - definitely not possible in the case of PHP.
Regards,
------------------------------------------------
Basil Hussain (basil.hussain@xxxxxxxxxxxxxxxxxx)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread67800@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.