docker compose cp
docker-compose exec [service] mysqldump -u [user name] –p [password] [options] [database_name] [tablename] > [dumpfilename.sql]
docker exec -t [hash container] mysqldump -u [user name] –p [password] [options] [database_name] [tablename] > [dumpfilename.sql]
SET foreign_key_checks = 0
SET foreign_key_checks = 1
There are many nitty gritty details when working with PHPs DateTime instances. You have to know their inner workings pretty well not to make mistakes with date handling. This cookbook entry holds several interesting pieces of information on how to work with PHP DateTime instances in ORM.
...
1. Always convert any DateTime instance to UTC.
2. Only set Timezones for displaying purposes
3. Save the Timezone in the Entity for persistence.
...
CREATE TABLE `persons` (
`id` INT(10,0) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_0900_ai_ci',
`phone` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_0900_ai_ci',
PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8mb4_0900_ai_ci'
ENGINE=InnoDB;
CREATE TABLE `orders` (
`id` INT(10,0) NOT NULL AUTO_INCREMENT,
`date` DATETIME NULL DEFAULT NULL,
`person_id` INT(10,0) NOT NULL DEFAULT '0',
`street` VARCHAR(255) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_0900_ai_ci',
`name` VARCHAR(255) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_0900_ai_ci',
`phone` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_0900_ai_ci',
PRIMARY KEY (`id`) USING BTREE,
INDEX `person_id` (`person_id`) USING BTREE,
CONSTRAINT `FK1_OP` FOREIGN KEY (`person_id`) REFERENCES `rmok`.`persons` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
COLLATE='utf8mb4_0900_ai_ci'
ENGINE=InnoDB;
longitude, latitude
longitude, latitude
?autocommit
, а нужно использовать транзакции.autocommit
.SELECT
с нужным условием, я не совсем понял зачем нужен JOIN
.JOIN
после WHERE
то вам следует обернуть в полноценный подзапрос.# Database
db:
...
ports:
- 127.0.0.100:3306:3306
...
slave_relay_log_info
server_cost
help_relation
# Development configuration
version: "3.1"
services:
# Database
db:
image: percona:latest
container_name: mydata
restart: on-failure
ports:
- 127.0.0.200:3306:3306
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=rk3kw1UDdqOEF4L1pmNkcyQ2oL
- MYSQL_DATABASE=mydata
- MYSQL_ROOT_HOST=%
"SELECT * FROM `w3m_404urls` WHERE `url`= '.$rqul.'"
"SELECT * FROM `w3m_404urls` WHERE `url`= '$rqul'"