Exemplo n.º 1
0
 /**
  *修改指定表记录
  */
 public static function updateTnameProducts($tName, $set, $where)
 {
     self::initDB();
     $sql = "UPDATE {$tName} {$set} {$where}";
     $query = self::$dbConn->query($sql);
     if ($query) {
         $affectRows = self::$dbConn->affected_rows($query);
         return $affectRows;
         //成功, 返回列表数据
     } else {
         self::$errCode = "003";
         self::$errMsg = "修改失败";
         return false;
         //失败则设置错误码和错误信息, 返回false
     }
 }
Exemplo n.º 2
0
 public static function getPropertyRelationList($id)
 {
     self::initDB();
     $sql = "SELECT a.propertyId,b.propertyName FROM pc_goods_property_relation AS a \n\t\t\t\t  LEFT JOIN pc_goods_property as b on a.propertyId=b.id WHERE a.goodsId='{$id}'";
     $query = self::$dbConn->query($sql);
     if ($query) {
         $ret = self::$dbConn->fetch_array_all($query);
         return $ret;
     } else {
         self::$errCode = "003";
         self::$errMsg = "444444444";
         return false;
     }
 }