Skip to content

Commit 01f592b

Browse files
committed
MySQL wants integers instead of booleans
Thanks to Alex Jake <[email protected]> for reporting.
1 parent 3f20073 commit 01f592b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ Here's a terse walkthrough for the tech-savy:
3030
7. Manually remove the `simpletracker` account from the users table.
3131

3232
The code has been tested on an Arch Linux server, using nginx (1.10.1), and both
33-
MySQL (10.1.18-MariaDB) and PostgreSQL (9.5.4). Your mileage may vary.
33+
MySQL (10.1.18-MariaDB) and PostgreSQL (9.5.4). Users have also reported the
34+
code working on Windows. Your mileage may vary.
3435

db.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function decode_data($s) {
7878
}
7979

8080
public function encode_bool($s) {
81-
return $s;
81+
return $s ? 1 : 0;
8282
}
8383
}
8484

0 commit comments

Comments
 (0)