Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `fotos` (
- `id` INT PRIMARY KEY AUTO_INCREMENT,
- `foto1` VARCHAR(20),
- `foto2` VARCHAR(20),
- `foto3` VARCHAR(20)
- );
- INSERT INTO `fotos` VALUES (null, 'aaa.jpg', 'bbb.jpg', 'ccc.jpg');
- INSERT INTO `fotos` VALUES (null, 'ddd.jpg', 'aaa.jpg', 'bbb.jpg');
- INSERT INTO `fotos` VALUES (null, 'mmm.jpg', 'qqq.jpg', 'ooo.jpg');
- --------------------------------------------------
- UPDATE
- `fotos`
- SET
- `foto1` = REPLACE(`foto1`, 'aaa.jpg', ''),
- `foto2` = REPLACE(`foto2`, 'aaa.jpg', ''),
- `foto3` = REPLACE(`foto3`, 'aaa.jpg', '')
- WHERE
- id = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement