mysql.h
MySQLMud/src/mysql.h · 627 B
From the archive MySQLMud.tar.gz
Download the archive « Back to the archive contents
/* mysql.h */
#include <mysql/mysql.h>
MYSQL mysqlconn;
MYSQL_RES *result;
MYSQL_ROW row;
#define MY_SERVER "127.0.0.1"
#define MY_USER "cyhawk"
#define MY_PWD "Put your own password here."
#define MY_DB "vandagard"
#define MY_SOCK NULL
#define MY_PORT 3306
#define MY_FLAG 0
/* Macros */
#define STARTROW( row, res) \
while( (row = mysql_fetch_row(res)) ) {
#define GET_STR_ROW( thing, field, row, num) \
(thing)->field = str_dup( row[num] )
#define GET_NUM_ROW( thing, field, row, num) \
(item)->field = atoi( row[num] )