mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
sql ifdefs
This commit is contained in:
parent
18e72b74cc
commit
d52b7ee982
2 changed files with 15 additions and 5 deletions
|
@ -1,5 +1,7 @@
|
|||
#include <net.h>
|
||||
|
||||
#if defined(STORAGE_PGSQL)
|
||||
|
||||
/*
|
||||
* using one database connection is sufficient
|
||||
*
|
||||
|
@ -10,10 +12,8 @@
|
|||
|
||||
create() {
|
||||
int ret;
|
||||
#if defined(STORAGE_PGSQL)
|
||||
ret = pg_connect_sync(STORAGE_PGSQL_CONNECT);
|
||||
PT(("ret %d\n", ret))
|
||||
#endif
|
||||
}
|
||||
|
||||
mixed query(string q, varargs mixed args) {
|
||||
|
@ -21,3 +21,5 @@ mixed query(string q, varargs mixed args) {
|
|||
// avoid sql injections
|
||||
return pg_query_sync(sprintf(q, args...));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue