Lines Matching refs:param
449 static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, enum pdo… in pdo_mysql_stmt_param_hook() argument
459 if (S->stmt && param->is_param) { in pdo_mysql_stmt_param_hook()
463 if (param->paramno < 0 || param->paramno >= S->num_params) { in pdo_mysql_stmt_param_hook()
470 b = &S->params[param->paramno]; in pdo_mysql_stmt_param_hook()
471 param->driver_data = b; in pdo_mysql_stmt_param_hook()
472 b->is_null = &S->in_null[param->paramno]; in pdo_mysql_stmt_param_hook()
473 b->length = &S->in_length[param->paramno]; in pdo_mysql_stmt_param_hook()
487 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pdo_mysql_stmt_param_hook()
488 Z_TYPE_P(param->parameter) == IS_NULL) { in pdo_mysql_stmt_param_hook()
489 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_NULL); in pdo_mysql_stmt_param_hook()
493 b = (PDO_MYSQL_PARAM_BIND*)param->driver_data; in pdo_mysql_stmt_param_hook()
495 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pdo_mysql_stmt_param_hook()
496 Z_TYPE_P(param->parameter) == IS_NULL) { in pdo_mysql_stmt_param_hook()
506 switch (PDO_PARAM_TYPE(param->param_type)) { in pdo_mysql_stmt_param_hook()
511 if (Z_TYPE_P(param->parameter) == IS_RESOURCE) { in pdo_mysql_stmt_param_hook()
513 php_stream_from_zval_no_verify(stm, ¶m->parameter); in pdo_mysql_stmt_param_hook()
515 SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter); in pdo_mysql_stmt_param_hook()
516 Z_TYPE_P(param->parameter) = IS_STRING; in pdo_mysql_stmt_param_hook()
517 Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm, in pdo_mysql_stmt_param_hook()
518 &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0); in pdo_mysql_stmt_param_hook()
532 PDO_DBG_INF_FMT("param->parameter->type=%d", Z_TYPE_P(param->parameter)); in pdo_mysql_stmt_param_hook()
533 switch (Z_TYPE_P(param->parameter)) { in pdo_mysql_stmt_param_hook()
535 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_VAR_STRING); in pdo_mysql_stmt_param_hook()
539 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_LONGLONG); in pdo_mysql_stmt_param_hook()
541 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_LONG); in pdo_mysql_stmt_param_hook()
545 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_DOUBLE); in pdo_mysql_stmt_param_hook()
553 PDO_DBG_INF_FMT("param->parameter->type=%d", Z_TYPE_P(param->parameter)); in pdo_mysql_stmt_param_hook()
554 switch (Z_TYPE_P(param->parameter)) { in pdo_mysql_stmt_param_hook()
557 b->buffer = Z_STRVAL_P(param->parameter); in pdo_mysql_stmt_param_hook()
558 b->buffer_length = Z_STRLEN_P(param->parameter); in pdo_mysql_stmt_param_hook()
559 *b->length = Z_STRLEN_P(param->parameter); in pdo_mysql_stmt_param_hook()
564 b->buffer = &Z_LVAL_P(param->parameter); in pdo_mysql_stmt_param_hook()
569 b->buffer = &Z_DVAL_P(param->parameter); in pdo_mysql_stmt_param_hook()