This commit is contained in:
MassiveAtoms 2019-07-21 22:21:09 -03:00
parent a54016340a
commit e49b206df7

View File

@ -148,12 +148,13 @@ void current_status_parkspots(vector<Park_spot>& spots) {
vector<Park_time> reports_from_customer(int cid, pair<int, int> period) {
vector<Park_time> park_times;
// debug
cout << "it called";
SQLite::Statement query(
data::db, "SELECT * FROM Park_time WHERE 'customer_id' = '?' AND start > ? AND end < ?;");
query.bind(1, cid);
data::db, "SELECT * FROM Park_time WHERE 'customer_id' = '?' AND start > '?' AND end < '?';");
// query.bind(1, cid);
query.bind(2, period.first);
cout << "before\n";
query.bind(3, period.second);
cout << "after\n";
while (query.executeStep()) {
int id = query.getColumn(1);
int spotid = query.getColumn(2);