Lines Matching refs:param
176 struct pdo_bound_param_data *param; in odbc_stmt_execute() local
178 rc = SQLParamData(S->stmt, (SQLPOINTER*)¶m); in odbc_stmt_execute()
184 P = (pdo_odbc_param*)param->driver_data; in odbc_stmt_execute()
185 if (Z_TYPE_P(param->parameter) != IS_RESOURCE) { in odbc_stmt_execute()
188 convert_to_string(param->parameter); in odbc_stmt_execute()
191 Z_STRVAL_P(param->parameter), in odbc_stmt_execute()
192 Z_STRLEN_P(param->parameter), in odbc_stmt_execute()
195 SQLPutData(S->stmt, Z_STRVAL_P(param->parameter), in odbc_stmt_execute()
196 Z_STRLEN_P(param->parameter)); in odbc_stmt_execute()
215 php_stream_from_zval_no_verify(stm, ¶m->parameter); in odbc_stmt_execute()
276 static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, in odbc_stmt_param_hook() argument
286 if (param->is_param) { in odbc_stmt_param_hook()
296 P = param->driver_data; in odbc_stmt_param_hook()
305 switch (PDO_PARAM_TYPE(param->param_type)) { in odbc_stmt_param_hook()
316 …rc = SQLDescribeParam(S->stmt, (SQLUSMALLINT) param->paramno+1, &sqltype, &precision, &scale, &nul… in odbc_stmt_param_hook()
320 sqltype = PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB ? in odbc_stmt_param_hook()
327 if (param->max_value_len > 0) { in odbc_stmt_param_hook()
328 precision = param->max_value_len; in odbc_stmt_param_hook()
338 param->driver_data = P; in odbc_stmt_param_hook()
349 if ((param->param_type & PDO_PARAM_INPUT_OUTPUT) == PDO_PARAM_INPUT_OUTPUT) { in odbc_stmt_param_hook()
351 } else if (param->max_value_len <= 0) { in odbc_stmt_param_hook()
358 if (PDO_PARAM_TYPE(param->param_type) != PDO_PARAM_NULL) { in odbc_stmt_param_hook()
360 P->len = param->max_value_len > 0 ? param->max_value_len : precision; in odbc_stmt_param_hook()
368 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && P->paramtype != SQL_PARAM_INPUT) { in odbc_stmt_param_hook()
373 rc = SQLBindParameter(S->stmt, (SQLUSMALLINT) param->paramno+1, in odbc_stmt_param_hook()
376 (SQLPOINTER)param : in odbc_stmt_param_hook()
390 P = param->driver_data; in odbc_stmt_param_hook()
391 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in odbc_stmt_param_hook()
392 if (Z_TYPE_P(param->parameter) == IS_RESOURCE) { in odbc_stmt_param_hook()
396 php_stream_from_zval_no_verify(stm, ¶m->parameter); in odbc_stmt_param_hook()
435 convert_to_string(param->parameter); in odbc_stmt_param_hook()
437 P->len = Z_STRLEN_P(param->parameter); in odbc_stmt_param_hook()
438 memcpy(P->outbuf, Z_STRVAL_P(param->parameter), P->len); in odbc_stmt_param_hook()
440 P->len = SQL_LEN_DATA_AT_EXEC(Z_STRLEN_P(param->parameter)); in odbc_stmt_param_hook()
443 …} else if (Z_TYPE_P(param->parameter) == IS_NULL || PDO_PARAM_TYPE(param->param_type) == PDO_PARAM… in odbc_stmt_param_hook()
446 convert_to_string(param->parameter); in odbc_stmt_param_hook()
450 Z_STRVAL_P(param->parameter), in odbc_stmt_param_hook()
451 Z_STRLEN_P(param->parameter), in odbc_stmt_param_hook()
455 P->len = Z_STRLEN_P(param->parameter); in odbc_stmt_param_hook()
456 memcpy(P->outbuf, Z_STRVAL_P(param->parameter), P->len); in odbc_stmt_param_hook()
464 P->len = SQL_LEN_DATA_AT_EXEC(Z_STRLEN_P(param->parameter)); in odbc_stmt_param_hook()
470 P = param->driver_data; in odbc_stmt_param_hook()
479 zval_dtor(param->parameter); in odbc_stmt_param_hook()
480 ZVAL_NULL(param->parameter); in odbc_stmt_param_hook()
483 convert_to_string(param->parameter); in odbc_stmt_param_hook()
497 Z_STRVAL_P(param->parameter) = erealloc(Z_STRVAL_P(param->parameter), srclen+1); in odbc_stmt_param_hook()
498 memcpy(Z_STRVAL_P(param->parameter), srcbuf, srclen); in odbc_stmt_param_hook()
499 Z_STRLEN_P(param->parameter) = srclen; in odbc_stmt_param_hook()
500 Z_STRVAL_P(param->parameter)[srclen] = '\0'; in odbc_stmt_param_hook() local