mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
18 lines
398 B
C++
18 lines
398 B
C++
#include <MySql/MySql.h>
|
|
|
|
using namespace Upp;
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
MySqlSession session;
|
|
// substitute your 'username' and 'password' here:
|
|
if(!session.Connect("username", "password", "mysql", "localhost")) {
|
|
printf("Can't connect with MySql\n");
|
|
return;
|
|
}
|
|
Sql sql(session);
|
|
sql.Execute("use mysql");
|
|
sql.Execute("show tables");
|
|
while(sql.Fetch())
|
|
Cout() << (String)sql[0] << '\n';
|
|
}
|