summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2007-04-12 18:10:59 +0000
committerpixel <pixel>2007-04-12 18:10:59 +0000
commit753b838216316509ba5069ce44214630042bd33d (patch)
tree81dd0d7e98be0e3984fe9bd6d138c9c6e5cfdf94
parent59dbf59fdad62434e8a736c4d791f22a16ad6c2e (diff)
Adding error message support.
-rw-r--r--include/SQL.h2
-rw-r--r--lib/SQL.cc8
2 files changed, 10 insertions, 0 deletions
diff --git a/include/SQL.h b/include/SQL.h
index 5cccd1c..fa1a163 100644
--- a/include/SQL.h
+++ b/include/SQL.h
@@ -17,6 +17,8 @@ class SQLConnection : public Base {
AssocArray fetchrow();
int numaffectedrows();
int insertid();
+ int errno();
+ String error();
private:
MYSQL con;
MYSQL_RES * res;
diff --git a/lib/SQL.cc b/lib/SQL.cc
index 98b8824..3234ffd 100644
--- a/lib/SQL.cc
+++ b/lib/SQL.cc
@@ -87,4 +87,12 @@ int SQLConnection::insertid() {
return ii;
}
+int SQLConnection::errno() {
+ return mysql_errno(&con);
+}
+
+String SQLConnection::error() {
+ return mysql_error(&con);
+}
+
#endif