mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-21 03:16:54 +01:00
27 lines
493 B
C++
27 lines
493 B
C++
#include "mysql_query_result.h"
|
|
|
|
#include <cstdio>
|
|
|
|
bool MysqlQueryResult::next_row() {
|
|
current_row = mysql_fetch_row(result);
|
|
|
|
//null if no result
|
|
return current_row;
|
|
}
|
|
|
|
const char* MysqlQueryResult::get_cell(const int index) {
|
|
if (!current_row)
|
|
return "";
|
|
|
|
return current_row[index];
|
|
}
|
|
|
|
MysqlQueryResult::MysqlQueryResult() : QueryResult() {
|
|
result = nullptr;
|
|
}
|
|
|
|
MysqlQueryResult::~MysqlQueryResult() {
|
|
if(result) {
|
|
mysql_free_result(result);
|
|
}
|
|
} |