Lines Matching refs:param

1376 static int register_bound_parameter_to_sqlite(struct php_sqlite3_bound_param *param, php_sqlite3_st…  argument
1388 if (param->name) {
1389 if (param->name[0] != ':') {
1391 char *temp = emalloc(++param->name_len + 1);
1393 memmove(temp+1, param->name, param->name_len);
1394 param->name = temp;
1396 param->name = estrndup(param->name, param->name_len);
1399 param->param_number = sqlite3_bind_parameter_index(stmt->stmt, param->name);
1402 if (param->param_number < 1) {
1403 efree(param->name);
1407 if (param->param_number >= 1) {
1408 zend_hash_index_del(hash, param->param_number);
1411 if (param->name) {
1412 zend_hash_update(hash, param->name, param->name_len, param, sizeof(*param), NULL);
1414 zend_hash_index_update(hash, param->param_number, param, sizeof(*param), NULL);
1427 struct php_sqlite3_bound_param param = {0}; local
1432 param.param_number = -1;
1433 param.type = SQLITE3_TEXT;
1435 …RSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "lz|l", &param.param_number, &param.parameter, &param
1436 …se_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|l", &param.name, &param.name_len, &param.parameter, &
1441 Z_ADDREF_P(param.parameter);
1443 if (!register_bound_parameter_to_sqlite(&param, stmt_obj TSRMLS_CC)) {
1444 if (param.parameter) {
1445 zval_ptr_dtor(&(param.parameter));
1446 param.parameter = NULL;
1460 struct php_sqlite3_bound_param param = {0}; local
1465 param.param_number = -1;
1466 param.type = SQLITE3_TEXT;
1468 …SE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "lz/|l", &param.param_number, &param.parameter, &param
1469 …e_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|l", &param.name, &param.name_len, &param.parameter, &
1474 Z_ADDREF_P(param.parameter);
1476 if (!register_bound_parameter_to_sqlite(&param, stmt_obj TSRMLS_CC)) {
1477 if (param.parameter) {
1478 zval_ptr_dtor(&(param.parameter));
1479 param.parameter = NULL;
1495 struct php_sqlite3_bound_param *param; local
1509 while (zend_hash_get_current_data(stmt_obj->bound_params, (void **)&param) == SUCCESS) {
1511 if (Z_TYPE_P(param->parameter) == IS_NULL) {
1512 sqlite3_bind_null(stmt_obj->stmt, param->param_number);
1517 switch (param->type) {
1519 convert_to_long(param->parameter);
1521 sqlite3_bind_int64(stmt_obj->stmt, param->param_number, Z_LVAL_P(param->parameter));
1523 sqlite3_bind_int(stmt_obj->stmt, param->param_number, Z_LVAL_P(param->parameter));
1529 sqlite3_bind_double(stmt_obj->stmt, param->param_number, Z_DVAL_P(param->parameter));
1537 if (Z_TYPE_P(param->parameter) == IS_RESOURCE) {
1538 php_stream_from_zval_no_verify(stream, &param->parameter);
1540 …php_sqlite3_error(stmt_obj->db_obj, "Unable to read stream for parameter %ld", param->param_number…
1545 convert_to_string(param->parameter);
1546 blength = Z_STRLEN_P(param->parameter);
1547 buffer = Z_STRVAL_P(param->parameter);
1550 sqlite3_bind_blob(stmt_obj->stmt, param->param_number, buffer, blength, SQLITE_TRANSIENT);
1559 convert_to_string(param->parameter);
1560 …sqlite3_bind_text(stmt_obj->stmt, param->param_number, Z_STRVAL_P(param->parameter), Z_STRLEN_P(pa…
1564 sqlite3_bind_null(stmt_obj->stmt, param->param_number);
1568 …stmt_obj->db_obj, "Unknown parameter type: %ld for parameter %ld", param->type, param->param_numbe…
1899 ZEND_ARG_INFO(1, param)
1905 ZEND_ARG_INFO(0, param)
2219 struct php_sqlite3_bound_param *param = (struct php_sqlite3_bound_param*)data; local
2221 if (param->name) {
2222 efree(param->name);
2225 if (param->parameter) {
2226 zval_ptr_dtor(&(param->parameter));
2227 param->parameter = NULL;