php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_pdo_error.h File Reference
#include "php_pdo_driver.h"

Go to the source code of this file.

Macros

#define PDO_DBH_CLEAR_ERR()
 
#define PDO_STMT_CLEAR_ERR()
 
#define PDO_HANDLE_DBH_ERR()
 
#define PDO_HANDLE_STMT_ERR()
 

Functions

PDO_API void pdo_handle_error (pdo_dbh_t *dbh, pdo_stmt_t *stmt)
 

Macro Definition Documentation

◆ PDO_DBH_CLEAR_ERR

#define PDO_DBH_CLEAR_ERR ( )
Value:
do { \
strlcpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
if (dbh->query_stmt) { \
dbh->query_stmt = NULL; \
zval_ptr_dtor(&dbh->query_stmt_zval); \
} \
} while (0)
#define NULL
Definition gdcache.h:45
#define PDO_ERR_NONE

Definition at line 24 of file php_pdo_error.h.

◆ PDO_HANDLE_DBH_ERR

#define PDO_HANDLE_DBH_ERR ( )
Value:
if (strcmp(dbh->error_code, PDO_ERR_NONE)) { pdo_handle_error(dbh, NULL); }
PDO_API void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt)
Definition pdo_dbh.c:128
strcmp(string $string1, string $string2)

Definition at line 32 of file php_pdo_error.h.

◆ PDO_HANDLE_STMT_ERR

#define PDO_HANDLE_STMT_ERR ( )
Value:
if (strcmp(stmt->error_code, PDO_ERR_NONE)) { pdo_handle_error(stmt->dbh, stmt); }

Definition at line 33 of file php_pdo_error.h.

◆ PDO_STMT_CLEAR_ERR

#define PDO_STMT_CLEAR_ERR ( )
Value:
strcpy(stmt->error_code, PDO_ERR_NONE)

Definition at line 31 of file php_pdo_error.h.

Function Documentation

◆ pdo_handle_error()

PDO_API void pdo_handle_error ( pdo_dbh_t * dbh,
pdo_stmt_t * stmt )

Definition at line 128 of file pdo_dbh.c.