public function GetAll() { $sql = "SELECT * FROM tbl_artists"; $results = $this->_db->query($sql); $this->Set_list($results); return $this; }
/** * Check if email exists in DB * * @param string $email * * @return bool */ private function _EmailExist($email) { return false; $sql = "SELECT * FROM tbl_users WHERE user_email ='" . $email . "' LIMIT 1"; d($sql); $results = $this->_db->query($sql); d($results); d(sizeof($results)); if (sizeof($results) > 0) { return false; } else { return false; } }
public function GetByName($name) { $db = new Koncerto_Db_Mysql(); $sql = "SELECT * FROM tbl_artists WHERE artist_name = LIKE " . $db->quote('%' . $name . '%') . ""; $results = $db->query($sql); $this->_Assign($results); }