Mercurial > garten
comparison db.c @ 16:3c104b5f5158
fixed small bug
author | meillo@marmaro.de |
---|---|
date | Wed, 23 Jul 2008 16:49:10 +0200 |
parents | 082566ce7d10 |
children | 5e6c9260913a |
comparison
equal
deleted
inserted
replaced
15:082566ce7d10 | 16:3c104b5f5158 |
---|---|
45 } | 45 } |
46 | 46 |
47 | 47 |
48 int read_time() { | 48 int read_time() { |
49 sprintf(query, "select time from game;"); | 49 sprintf(query, "select time from game;"); |
50 db_query(query); | 50 stmt = db_query(query); |
51 if (sqlite3_step(stmt) != SQLITE_ROW) { | 51 if (sqlite3_step(stmt) != SQLITE_ROW) { |
52 printf("error: %s\n", sqlite3_errmsg(db)); | 52 printf("error: %s\n", sqlite3_errmsg(db)); |
53 exit(1); | 53 exit(1); |
54 } | 54 } |
55 gametime = sqlite3_column_int(stmt, 0); | 55 gametime = sqlite3_column_int(stmt, 0); |