summaryrefslogtreecommitdiffstats
path: root/db_demo/db.h
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-05-07 14:53:17 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-05-07 14:53:17 (GMT)
commitbbcc93fada48dfbee6b45eb73ba58f53b4f9d1e2 (patch)
treeeaaa9c36b5e261a3e4477864c51eed87a65f2503 /db_demo/db.h
parentf88154ffd368af3a63ddbed5516f51097721a248 (diff)
download2iv55-bbcc93fada48dfbee6b45eb73ba58f53b4f9d1e2.zip
2iv55-bbcc93fada48dfbee6b45eb73ba58f53b4f9d1e2.tar.gz
2iv55-bbcc93fada48dfbee6b45eb73ba58f53b4f9d1e2.tar.bz2
db queries uitvoerbaar + printf info (van select resultaat etc).
Diffstat (limited to 'db_demo/db.h')
-rw-r--r--db_demo/db.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/db_demo/db.h b/db_demo/db.h
new file mode 100644
index 0000000..4b896d2
--- /dev/null
+++ b/db_demo/db.h
@@ -0,0 +1,25 @@
+#ifndef _DB_H
+#define _DB_H
+
+#define PGHOST "matchblox.schinagl.nl"
+#define PGPORT "5432"
+#define PGOPTIONS "\0"
+#define PGTTY "\0"
+#define DBNAME "2iv55"
+#define LOGIN "2iv55"
+#define PWD "uhtfiwwp"
+
+enum db_result
+{
+ DB_OK,
+ DB_NO_CONNECTION,
+ DB_COULD_NOT_EXECUTE,
+ DB_INCORRECT_RESULT,
+ DB_COULD_NOT_OUTPUT
+};
+
+int db_init(void);
+int db_close(void);
+int db_execute(const char*);
+
+#endif \ No newline at end of file