mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 18:45:55 +00:00
Add a single SQL_FOREACH.
This commit is contained in:
@@ -5,6 +5,10 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "../src/types.h"
|
#include "../src/types.h"
|
||||||
|
|
||||||
|
#define SQL_FOREACH(_db, _strQuery) \
|
||||||
|
if ((_db)->executeSQL(_strQuery)) \
|
||||||
|
for (bool _bMore = (_db)->startIterRows(); _bMore; _bMore = (_db)->getNextRow())
|
||||||
|
|
||||||
/*
|
/*
|
||||||
this maintains the connection to the database
|
this maintains the connection to the database
|
||||||
*/
|
*/
|
||||||
@@ -76,6 +80,6 @@ public:
|
|||||||
// char* getSingleDBValueStr(const char* sql, std::string& retStr);
|
// char* getSingleDBValueStr(const char* sql, std::string& retStr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// vim:ts=4
|
||||||
|
|||||||
Reference in New Issue
Block a user