跳到主要内容

Update single or multiple records

Example DB Table

smartPanda.mdh.brand

CREATE TABLE `brand`
(
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`logo` text,
`logo_url` varchar(255) DEFAULT NULL,
`website` varchar(255) DEFAULT NULL,
`disabled` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
);

Update records based on the field conditions specified in the method

API updateBy*

Example Request

{
"method": "smartPanda.mdh.brand.updateById",
"params": [
1,
{
"name": "My Name"
}
]
}

Example Response

{
"count": 1
}

Returns an object containing the count attribute, indicating the number of rows affected.