mirror of
https://github.com/Hizenberg469/BPIT-ATTENDANCE.git
synced 2026-04-20 02:02:25 +03:00
28 lines
429 B
C
28 lines
429 B
C
#ifndef __DB_H_
|
|
#define __DB_H_
|
|
|
|
#include <mysql.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdarg.h>
|
|
|
|
void
|
|
connect_to_db(char db[],MYSQL *con);
|
|
|
|
void
|
|
retrieve_table(char table[],MYSQL *con);
|
|
|
|
MYSQL_RES *
|
|
extract_table(MYSQL *con);
|
|
|
|
int
|
|
num_of_entries(MYSQL_RES *result_table);
|
|
|
|
#define ITERATE_TABLE(row,result) { \
|
|
while( (row = mysql_fetch_row(result) ) ) {
|
|
|
|
#define ITERATE_TABLE_END }}
|
|
|
|
#endif
|