We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 26dacf31 authored by idflood's avatar idflood

oops... forgot that 0 == false

parent b477e43a
......@@ -79,7 +79,7 @@ class PlayStats {
* todo: completly remove this dirty db type check.
*/
$query = "SELECT COUNT(*) as count, DATE(TO_TIMESTAMP(time)) as date FROM $table";
if( strpos($connect_string , "mysql" ) == 0 ) $query = "SELECT COUNT(*) as count,DATE(FROM_UNIXTIME(time)) as date FROM $table";
if( strpos($connect_string , "mysql" ) === 0 ) $query = "SELECT COUNT(*) as count,DATE(FROM_UNIXTIME(time)) as date FROM $table";
$query .= (!is_null($constraint) || ($table == "Scrobbles")) ? ' WHERE ' : null;
$query .= (!is_null($constraint)) ? ' username = ' . $mdb2->quote($constraint, 'text') : null;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment