예제 #1
0
 public static function getUser($condition)
 {
     $sql = "SELECT * FROM " . self::$table . " WHERE " . $condition;
     $userData = parent::fetchAssoc(parent::query($sql));
     unset($userData["password_user"]);
     return $userData;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 static function getPlatformData($id_platform)
 {
     $sql = "SELECT * FROM platforms\n                WHERE\n                    id_platform = '" . $id_platform . "'";
     $q = parent::query($sql);
     return parent::fetchAssoc($q);
 }