Lines Matching refs:sql
60 $sql = "DELETE FROM stars WHERE pid = ? AND login = ?";
61 $db->exec($sql, [$pageid, $user]);
64 $sql = "INSERT OR IGNORE INTO stars (pid,login,stardate) VALUES (?,?,?)";
65 $db->exec($sql, [$pageid, $user, time()]);
90 $sql = "SELECT stardate FROM stars WHERE pid = ? AND login = ?";
91 return (int)$db->queryValue($sql, [$pageid, $user]);
115 $sql = "SELECT pid, stardate FROM stars WHERE ";
118 $sql .= 'lower(login) = lower(?)';
120 $sql .= 'login = ?';
122 $sql .= " ORDER BY stardate DESC";
124 $sql .= ' LIMIT ' . $limit;
127 return $db->queryKeyValueList($sql, [$user]);