![php pdo execute php pdo execute](https://i.stack.imgur.com/gZ7zd.png)
Php pdo execute driver#
Database-specific features may be exposed as standard extension functions by any database driver that implements the PDO interface. Preparing a statement improves performance because the database server creates an optimized access plan for data retrieval that it can reuse if the statement is executed again. Please read the section on Booleans for more information. To prepare and execute an SQL statement that includes variable input, use the PDO::prepare, PDOStatement::bindParam, and PDOStatement::execute methods.
![php pdo execute php pdo execute](https://slidetodoc.com/presentation_image_h/00b889f6a9c5ee36f57662933d546fa3/image-17.jpg)
This function may return Boolean false, but may also return a non-Boolean value which evaluates to false. If no rows were affected, PDO::exec () returns 0. Вообщем если не трудно подскажите в чем может быть проблема, метод execute ничего не сохраняет в БД не выдаёт ошибок и возвращает false, что вроде как очень странно потому что код вроде как правильный (его прикрепляю ниже). Calling PDO::prepare() and PDOStatement::execute() for statements that will be issued multiple times with different parameter values. Call PDOStatement::closeCursor () to release the database resources associated with the PDOStatement object before issuing your next call to PDO::query (). PDO in PHP (PHP Data Objects) is a lightweight, consistent framework for accessing databases in PHP. PDO::exec () returns the number of rows that were modified or deleted by the SQL statement you issued.