2013-05-05 11:57:14 +02:00
|
|
|
/*
|
|
|
|
* sql.h, SJ
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SQL_H
|
|
|
|
#define _SQL_H
|
|
|
|
|
|
|
|
|
2017-08-08 15:34:45 +02:00
|
|
|
int open_database(struct session_data *sdata, struct config *cfg);
|
2013-05-05 11:57:14 +02:00
|
|
|
void close_database(struct session_data *sdata);
|
2016-04-05 21:10:09 +02:00
|
|
|
int prepare_sql_statement(struct session_data *sdata, MYSQL_STMT **stmt, char *s);
|
2016-01-02 08:16:38 +01:00
|
|
|
void p_query(struct session_data *sdata, char *s);
|
2017-08-08 15:34:45 +02:00
|
|
|
int p_exec_query(struct session_data *sdata, MYSQL_STMT *stmt, struct data *data);
|
|
|
|
int p_store_results(MYSQL_STMT *stmt, struct data *data);
|
2013-05-05 11:57:14 +02:00
|
|
|
int p_fetch_results(MYSQL_STMT *stmt);
|
|
|
|
void p_free_results(MYSQL_STMT *stmt);
|
2017-08-08 15:34:45 +02:00
|
|
|
void p_bind_init(struct data *data);
|
2013-05-05 11:57:14 +02:00
|
|
|
uint64 p_get_insert_id(MYSQL_STMT *stmt);
|
|
|
|
int p_get_affected_rows(MYSQL_STMT *stmt);
|
|
|
|
void close_prepared_statement(MYSQL_STMT *stmt);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _PILER_H */
|
|
|
|
|