Browse Source

Will print out the contents of .sql on failure to prepare statement.

master
5 years ago
parent
commit
afb0a4848e
  1. 2
      includes/dbquery.c

2
includes/dbquery.c

@ -116,7 +116,7 @@ static bool executequery(const char *sql, const char *str) { @@ -116,7 +116,7 @@ static bool executequery(const char *sql, const char *str) {
// prepare sql to s, reading until null character.
con = sqlite3_prepare_v2(db, sql, -1, &s, NULL);
if (con != SQLITE_OK) {
fprintf(stderr, "Could not prepare SQL statement: %s\n", sqlite3_errmsg(db));
fprintf(stderr, "Could not prepare SQL statement: %s\n\n%s", sqlite3_errmsg(db), sql);
return false;
}
// bind parameter with a string length that is the # of bytes to null char.

Loading…
Cancel
Save