Lines Matching refs:param
78 static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, in pdo_sqlite_stmt_param_hook() argument
90 if (param->is_param) { in pdo_sqlite_stmt_param_hook()
92 if (param->paramno == -1) { in pdo_sqlite_stmt_param_hook()
93 param->paramno = sqlite3_bind_parameter_index(S->stmt, param->name) - 1; in pdo_sqlite_stmt_param_hook()
96 switch (PDO_PARAM_TYPE(param->param_type)) { in pdo_sqlite_stmt_param_hook()
101 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
109 if (Z_TYPE_P(param->parameter) == IS_NULL) { in pdo_sqlite_stmt_param_hook()
110 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
114 convert_to_long(param->parameter); in pdo_sqlite_stmt_param_hook()
116 … if (SQLITE_OK == sqlite3_bind_int64(S->stmt, param->paramno + 1, Z_LVAL_P(param->parameter))) { in pdo_sqlite_stmt_param_hook()
120 if (SQLITE_OK == sqlite3_bind_int(S->stmt, param->paramno + 1, Z_LVAL_P(param->parameter))) { in pdo_sqlite_stmt_param_hook()
129 if (Z_TYPE_P(param->parameter) == IS_RESOURCE) { in pdo_sqlite_stmt_param_hook()
131 php_stream_from_zval_no_verify(stm, ¶m->parameter); in pdo_sqlite_stmt_param_hook()
133 SEPARATE_ZVAL(¶m->parameter); in pdo_sqlite_stmt_param_hook()
134 Z_TYPE_P(param->parameter) = IS_STRING; in pdo_sqlite_stmt_param_hook()
135 Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm, in pdo_sqlite_stmt_param_hook()
136 &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0); in pdo_sqlite_stmt_param_hook()
141 } else if (Z_TYPE_P(param->parameter) == IS_NULL) { in pdo_sqlite_stmt_param_hook()
142 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
148 convert_to_string(param->parameter); in pdo_sqlite_stmt_param_hook()
151 if (SQLITE_OK == sqlite3_bind_blob(S->stmt, param->paramno + 1, in pdo_sqlite_stmt_param_hook()
152 Z_STRVAL_P(param->parameter), in pdo_sqlite_stmt_param_hook()
153 Z_STRLEN_P(param->parameter), in pdo_sqlite_stmt_param_hook()
162 if (Z_TYPE_P(param->parameter) == IS_NULL) { in pdo_sqlite_stmt_param_hook()
163 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
167 convert_to_string(param->parameter); in pdo_sqlite_stmt_param_hook()
168 if(SQLITE_OK == sqlite3_bind_text(S->stmt, param->paramno + 1, in pdo_sqlite_stmt_param_hook()
169 Z_STRVAL_P(param->parameter), in pdo_sqlite_stmt_param_hook()
170 Z_STRLEN_P(param->parameter), in pdo_sqlite_stmt_param_hook()