跳到主要内容

Update a single record

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`)
);

Find the primary key specified in the method name and update

API setBy*

Example Request

{
"method": "smartPanda.mdh.brand.setById",
"params": [
1,
{
"name": "Brand Name",
"disabled": 1
}
]
}

Example Response

1