П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 4096 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 6757 раз(а).

Учебник HTML.
Просмотров 3718 раз(а).

Руководство по PHP5.
Просмотров 5991 раз(а).

Хостинг через призму DNS.
Просмотров 4809 раз(а).

Подборка текстов стандартных документов.
Просмотров 56244 раз(а).

Учебник PHP - Самоучитель
Просмотров 3703 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 8335 раз(а).

Внешние атаки...
Просмотров 4563 раз(а).

Учебник PHP.
Просмотров 3172 раз(а).

SSI в примерах.
Просмотров 175 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. Глава 45. PDO Driver How-To След.

pdo_stmt_t definition

All fields should be treated as read-only unless explicitly stated otherwise.

Рисунок 45-2. pdo_stmt_t

/* represents a prepared statement */
struct _pdo_stmt_t {
/* driver specifics */
struct pdo_stmt_methods *methods;   (1)
void *driver_data;  (2)

/* if true, we've already successfully executed this statement at least
 * once */
unsigned executed:1;(3)
/* if true, the statement supports placeholders and can implement
 * bindParam() for its prepared statements, if false, PDO should
 * emulate prepare and bind on its behalf */
unsigned supports_placeholders:2;   (4)

/* the number of columns in the result set; not valid until after
 * the statement has been executed at least once.  In some cases, might
 * not be valid until fetch (at the driver level) has been called at least once.
 * */
int column_count;   (5)
struct pdo_column_data *columns;(6)

/* points at the dbh that this statement was prepared on */
pdo_dbh_t *dbh;

/* keep track of bound input parameters.  Some drivers support
 * input/output parameters, but you can't rely on that working */
HashTable *bound_params;
/* When rewriting from named to positional, this maps positions to names */
HashTable *bound_param_map; 
/* keep track of PHP variables bound to named (or positional) columns
 * in the result set */
HashTable *bound_columns;

/* not always meaningful */
long row_count;

/* used to hold the statement's current query */
char *query_string;
int query_stringlen;

/* the copy of the query with expanded binds ONLY for emulated-prepare drivers */
char *active_query_string;
int active_query_stringlen;

/* the cursor specific error code. */
pdo_error_type error_code;

/* used by the query parser for driver specific
 * parameter naming (see pgsql driver for example) */
const char *named_rewrite_template;
};
(1)
The driver must set this during SKEL_handle_preparer().
(2)
This item is for use by the driver; the intended usage is to store a pointer (during SKEL_handle_factory()) to whatever instance data is required to maintain a connection to the database.
(3)
This is set by PDO after the statement has been executed for the first time. Your driver can inspect this value to determine if it can skip one-time actions as an optimization.
(4)
Discussed in more detail in Разд. SKEL_handle_preparer
(5)
Your driver is responsible for setting this field to the number of columns available in a result set. This is usually set during SKEL_stmt_execute() but with some database implementations, the column count may not be available until SKEL_stmt_fetch() has been called at least once. Drivers that SKEL_stmt_next_rowset() should update the column count when a new rowset is available.
(6)
PDO will allocate this field based on the value that you set for the column count. You are responsible for populating each column during SKEL_stmt_describe(). You must set the precision, maxlen, name, namelen and param_type members for each column. The name is expected to be allocated using emalloc(); PDO will efree() at the appropriate time.


Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru