Fix SQL query in pf::locationlog