aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-06-18 19:50:12 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-06-18 19:50:12 +0000
commit374e05afcc5f7325d1f37a8adb474d5637a24c04 (patch)
tree4f8e07423b67ea7a6b663f754ac5dacb3ead7009
parent945bafb2d8412874b5f1bd227e8aa109dec8231d (diff)
downloadellinika-374e05afcc5f7325d1f37a8adb474d5637a24c04.tar.gz
ellinika-374e05afcc5f7325d1f37a8adb474d5637a24c04.tar.bz2
Minor formatting changes
git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@137 941c8c0f-9102-463b-b60b-cd22ce0e6858
-rw-r--r--src/sql.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sql.c b/src/sql.c
index 2579c93..70c1fd9 100644
--- a/src/sql.c
+++ b/src/sql.c
@@ -39,7 +39,7 @@ va_sql_query(char *fmt, va_list ap)
{
char *buf = NULL;
int rc;
-
+
if (result) {
mysql_free_result(result);
result = NULL;
@@ -48,11 +48,13 @@ va_sql_query(char *fmt, va_list ap)
vasprintf(&buf, fmt, ap);
if (debug)
fprintf(stderr, "Executing query: %s\n", buf);
+
rc = mysql_query(&mysql, buf);
if (rc) {
fprintf(stderr, "MySQL Error: %s\n", mysql_error(&mysql));
if (!debug)
- fprintf(stderr, "The failed query was: %s\n", buf);
+ fprintf(stderr, "The failed query was: %s\n",
+ buf);
} else {
result = mysql_store_result(&mysql);
if (result) {

Return to:

Send suggestions and report system problems to the System administrator.