| 3 |
* database |
* database |
| 4 |
* - configuration and function of DB connection |
* - configuration and function of DB connection |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#include "common.h" |
#include "common.h" |
| 13 |
#include <mysql/mysql.h> |
#include <mysql/mysql.h> |
| 14 |
|
|
| 15 |
// Global declaration for database |
// Global declaration for database |
| 16 |
char DB_host[256]; |
char DB_host[DB_host_max_len + 1]; |
| 17 |
char DB_username[50]; |
char DB_username[DB_username_max_len + 1]; |
| 18 |
char DB_password[50]; |
char DB_password[DB_password_max_len + 1]; |
| 19 |
char DB_database[50]; |
char DB_database[DB_database_max_len + 1]; |
| 20 |
char DB_timezone[50]; |
char DB_timezone[DB_timezone_max_len + 1]; |
| 21 |
|
|
| 22 |
MYSQL *db_open() |
MYSQL *db_open() |
| 23 |
{ |
{ |