Example #1
0
 public static function update($data, $where = "", $table = "nt_email")
 {
     self::initDB();
     $sql = array2sql($data);
     if ($table == 'nt_email') {
         $sql = "UPDATE `" . self::$tabemail . "` SET " . $sql . " WHERE 1 " . $where;
     } else {
         $sql = "UPDATE `" . self::$tabsms . "` SET " . $sql . " WHERE 1 " . $where;
     }
     $query = self::$dbConn->query($sql);
     if ($query) {
         return true;
     } else {
         self::$errCode = "005";
         self::$errMsg = "Error occurred!Function=" . __FUNCTION__ . " sql= " . $sql;
         return false;
     }
 }