* In SQL error conditions, print the offending SQL statement.

This commit is contained in:
Justin Maggard 2010-06-22 00:42:51 +00:00
parent d1623ca25d
commit 4321892e15

2
sql.c
View File

@ -82,7 +82,7 @@ sql_get_int_field(sqlite3 *db, const char *fmt, ...)
case SQLITE_OK:
break;
default:
DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n", sqlite3_errmsg(db));
DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
sqlite3_free(sql);
return -1;
}