Lines Matching refs:param

469 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
480 if (S->stmt && param->is_param) { in pdo_mysql_stmt_param_hook()
484 if (param->paramno < 0 || param->paramno >= S->num_params) { in pdo_mysql_stmt_param_hook()
491 b = &S->params[param->paramno]; in pdo_mysql_stmt_param_hook()
492 param->driver_data = b; in pdo_mysql_stmt_param_hook()
493 b->is_null = &S->in_null[param->paramno]; in pdo_mysql_stmt_param_hook()
494 b->length = &S->in_length[param->paramno]; in pdo_mysql_stmt_param_hook()
508 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pdo_mysql_stmt_param_hook()
509 Z_TYPE_P(param->parameter) == IS_NULL) { in pdo_mysql_stmt_param_hook()
510 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_NULL); in pdo_mysql_stmt_param_hook()
514 b = (PDO_MYSQL_PARAM_BIND*)param->driver_data; in pdo_mysql_stmt_param_hook()
516 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pdo_mysql_stmt_param_hook()
517 Z_TYPE_P(param->parameter) == IS_NULL) { in pdo_mysql_stmt_param_hook()
527 switch (PDO_PARAM_TYPE(param->param_type)) { in pdo_mysql_stmt_param_hook()
532 if (Z_TYPE_P(param->parameter) == IS_RESOURCE) { in pdo_mysql_stmt_param_hook()
534 php_stream_from_zval_no_verify(stm, &param->parameter); in pdo_mysql_stmt_param_hook()
536 SEPARATE_ZVAL_IF_NOT_REF(&param->parameter); in pdo_mysql_stmt_param_hook()
537 Z_TYPE_P(param->parameter) = IS_STRING; in pdo_mysql_stmt_param_hook()
538 Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm, in pdo_mysql_stmt_param_hook()
539 &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0); 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()
556 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_VAR_STRING); in pdo_mysql_stmt_param_hook()
560 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_LONGLONG); in pdo_mysql_stmt_param_hook()
562 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_LONG); in pdo_mysql_stmt_param_hook()
566 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, param->parameter, MYSQL_TYPE_DOUBLE); in pdo_mysql_stmt_param_hook()
574 PDO_DBG_INF_FMT("param->parameter->type=%d", Z_TYPE_P(param->parameter)); in pdo_mysql_stmt_param_hook()
575 switch (Z_TYPE_P(param->parameter)) { in pdo_mysql_stmt_param_hook()
578 b->buffer = Z_STRVAL_P(param->parameter); in pdo_mysql_stmt_param_hook()
579 b->buffer_length = Z_STRLEN_P(param->parameter); in pdo_mysql_stmt_param_hook()
580 *b->length = Z_STRLEN_P(param->parameter); in pdo_mysql_stmt_param_hook()
585 b->buffer = &Z_LVAL_P(param->parameter); in pdo_mysql_stmt_param_hook()
590 b->buffer = &Z_DVAL_P(param->parameter); in pdo_mysql_stmt_param_hook()