Skip to content

Commit

Permalink
MySQL wants integers instead of booleans
Browse files Browse the repository at this point in the history
Thanks to Alex Jake <alex.jake@live.co.uk> for reporting.
  • Loading branch information
SuprDewd committed Jan 29, 2017
1 parent 3f20073 commit 01f592b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ Here's a terse walkthrough for the tech-savy:
7. Manually remove the `simpletracker` account from the users table.

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

2 changes: 1 addition & 1 deletion db.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function decode_data($s) {
}

public function encode_bool($s) {
return $s;
return $s ? 1 : 0;
}
}

Expand Down

0 comments on commit 01f592b

Please sign in to comment.