PHP uses pdo's like query statement and reports an error indirectly. MySQL server has gone away.

WBOY
Release: 2016-10-11 14:02:16
Original
1116 people have browsed it

PHP uses pdo's like query statement and reports an error indirectly. MySQL server has gone away.

As shown in the picture, it is an encapsulated PDO operation, sending sql and retrieving data!

Picture description

A sql statement uses bindColumn() of pdo to implement a like query

PHP uses pdo's like query statement and reports an error indirectly. MySQL server has gone away.
Option parameters

Error conditions

Indirect error, luckily it can run normally, the connection is mysql installed by myself on Alibaba Cloud, my personal blog runs normally, but I don’t know why the pdo query written by me reported an error

I have searched many times on the Internet
1. It cannot be that timeout has been set
2.max_allowed_packet is also set to 32M

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template