RE: MYSQL++: List of databases, then tables in each database
Using the MySQL++ library is their any call to 1) Get a list of the databases on the Server 2) List tables in a database given a database name. The best I could find was show databases show tables; or show tables from database name; Does anyone have any examples of how to implement these calls in Visual C++ using the MySQL++ API's ANY INPUT APPRECIATED I am using the Visual C++ library for development under MS VC++ 6 on Windows 2000 Advanced Server. *** Just another quick question; I have a line of code (below) but it does not output the query to the screen. In this case the query is Select * from Employees limit 20 but (below) causes just Query: to be displayed. Query query = con.query(); query select * from Employees limit 20; cout Query: query.preview() endl; Sorry if you get this for a second time - I didn't get much of a response from the plusplus mailing list. I assure you I have checked the web site and manual Thanks lots David Ayliffe (mailto:[EMAIL PROTECTED]) - 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 [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: list of databases
mysqlshow should work just fine. Tim Chambers wrote: Is there any way I can generate a list of the databases in mysql, perhaps with the mysqlshow command and some fancy grep? I'm looking for a list separated by spaces, something that I could use in a bash script. Thanks, Tim - 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 [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: list of databases
You can also use mysql and query "show databases" as in this sample script I transcript: DBS=`mysql -e "show databases"` for db in $DBS ; do if [ "$db" != "Database" ] ; then # skip the title "Database" included in the output of command DBS. mysql -e "show tables from $db" fi done Regards, Rosana "Gerald L. Clark" wrote: mysqlshow should work just fine. Tim Chambers wrote: Is there any way I can generate a list of the databases in mysql, perhaps with the mysqlshow command and some fancy grep? I'm looking for a list separated by spaces, something that I could use in a bash script. Thanks, Tim - 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 [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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 [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
list of databases
Is there any way I can generate a list of the databases in mysql, perhaps with the mysqlshow command and some fancy grep? I'm looking for a list separated by spaces, something that I could use in a bash script. Thanks, Tim - 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 [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php