public static function getUser($condition) { $sql = "SELECT * FROM " . self::$table . " WHERE " . $condition; $userData = parent::fetchAssoc(parent::query($sql)); unset($userData["password_user"]); return $userData; }
public static function getApp2PlatformData($id_application) { $result = array(); if (!empty($id_application)) { $sql = "SELECT * FROM app2platforms WHERE id_application = '" . $id_application . "'"; $q = parent::query($sql); while ($r = parent::fetchAssoc($q)) { $result[] = $r['id_platform']; } } return $result; }
public static function checkInBase($data, $exceptions = array()) { $condition = array(); if (is_array($data)) { foreach ($data as $k => $v) { if (!in_array($k, $exceptions)) { $condition[] = $k . ' = "' . parent::escapeString($v) . '"'; } } } if (count($condition)) { $sql = "SELECT * FROM check_log\n WHERE " . implode(" AND ", $condition); $q = parent::query($sql); $r = parent::fetchAssoc($q); print parent::queryError(); return $r['id_check_log'] ? $r['id_check_log'] : false; } return false; }
static function getPlatformData($id_platform) { $sql = "SELECT * FROM platforms\n WHERE\n id_platform = '" . $id_platform . "'"; $q = parent::query($sql); return parent::fetchAssoc($q); }