public static function update($pk, $fields)
    {
        return static::getDb()->table(static::getTableName())
            ->where(static::getDb()->getTablePk(static::getTableName()) . ' = :pk')
            ->setParam(':pk', $pk)
            ->update($fields);
    }
public static function update($pk, $fields)
    {
        return static::getDb()->table(static::getTableName())
            ->where(static::getDb()->getTablePk(static::getTableName()) . ' = :pk')
            ->setParam(':pk', $pk)
            ->update($fields);
    }
public static function update ( $ pk , $ fields ) { return static :: getDb ( ) -> table ( static :: getTableName ( ) ) -> where ( static :: getDb ( ) -> getTablePk ( static :: getTableName ( ) ) . ' = :pk' ) -> setParam ( ':pk' , $ pk ) -> update ( $ fields ) ; }
Return number of affected rows;
@param $pk
@param $fields
@return int
Return number of affected rows ;