diff --git a/nixtape/data/Library.php b/nixtape/data/Library.php index 8af909a014d6c2c5f5014ae9d80d30cc1b6db839..17770f645ab06100dc9adf358db95eef16f1c336 100644 --- a/nixtape/data/Library.php +++ b/nixtape/data/Library.php @@ -40,11 +40,11 @@ class Library { global $adodb; $delete_query = 'DELETE FROM Scrobbles WHERE userid=? AND time=? AND artist=? AND track=?'; - $delete_params = array($userid, $timestamp, $artist, $track); + $delete_params = array((int)$userid, (int)$timestamp, $artist, $track); // TODO Should we have a db trigger for this? $update_stats_query = 'UPDATE User_Stats SET scrobble_count=scrobble_count-1 WHERE userid=?'; - $update_stats_params = array($userid); + $update_stats_params = array((int)$userid); $adodb->StartTrans(); try {