Lines Matching refs:result

398 	if (stmt->result.var_cnt) {  in mysqli_stmt_bind_result_do_bind()
399 php_free_stmt_bind_buffer(stmt->result, FETCH_RESULT); in mysqli_stmt_bind_result_do_bind()
406 stmt->result.buf = (VAR_BUFFER *) p; in mysqli_stmt_bind_result_do_bind()
407 stmt->result.is_null = p + var_cnt * sizeof(VAR_BUFFER); in mysqli_stmt_bind_result_do_bind()
417 stmt->result.buf[ofs].type = IS_DOUBLE; in mysqli_stmt_bind_result_do_bind()
418 stmt->result.buf[ofs].buflen = sizeof(float); in mysqli_stmt_bind_result_do_bind()
420 stmt->result.buf[ofs].val = (char *)emalloc(sizeof(float)); in mysqli_stmt_bind_result_do_bind()
422 bind[ofs].buffer = stmt->result.buf[ofs].val; in mysqli_stmt_bind_result_do_bind()
423 bind[ofs].is_null = &stmt->result.is_null[ofs]; in mysqli_stmt_bind_result_do_bind()
427 stmt->result.buf[ofs].type = IS_DOUBLE; in mysqli_stmt_bind_result_do_bind()
428 stmt->result.buf[ofs].buflen = sizeof(double); in mysqli_stmt_bind_result_do_bind()
431 stmt->result.buf[ofs].val = (char *)emalloc(sizeof(double)); in mysqli_stmt_bind_result_do_bind()
433 bind[ofs].buffer = stmt->result.buf[ofs].val; in mysqli_stmt_bind_result_do_bind()
434 bind[ofs].is_null = &stmt->result.is_null[ofs]; in mysqli_stmt_bind_result_do_bind()
438 stmt->result.buf[ofs].type = IS_NULL; in mysqli_stmt_bind_result_do_bind()
447 bind[ofs].is_null = &stmt->result.is_null[ofs]; in mysqli_stmt_bind_result_do_bind()
455 stmt->result.buf[ofs].type = IS_LONG; in mysqli_stmt_bind_result_do_bind()
457 stmt->result.buf[ofs].val = (char *)emalloc(sizeof(int)); in mysqli_stmt_bind_result_do_bind()
459 bind[ofs].buffer = stmt->result.buf[ofs].val; in mysqli_stmt_bind_result_do_bind()
460 bind[ofs].is_null = &stmt->result.is_null[ofs]; in mysqli_stmt_bind_result_do_bind()
468 stmt->result.buf[ofs].type = IS_STRING; in mysqli_stmt_bind_result_do_bind()
469 stmt->result.buf[ofs].buflen = sizeof(my_ulonglong); in mysqli_stmt_bind_result_do_bind()
470 stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); in mysqli_stmt_bind_result_do_bind()
472 bind[ofs].buffer = stmt->result.buf[ofs].val; in mysqli_stmt_bind_result_do_bind()
473 bind[ofs].is_null = &stmt->result.is_null[ofs]; in mysqli_stmt_bind_result_do_bind()
474 bind[ofs].buffer_length = stmt->result.buf[ofs].buflen; in mysqli_stmt_bind_result_do_bind()
476 bind[ofs].length = &stmt->result.buf[ofs].output_len; in mysqli_stmt_bind_result_do_bind()
502 stmt->result.buf[ofs].type = IS_STRING; in mysqli_stmt_bind_result_do_bind()
517 stmt->result.buf[ofs].buflen = in mysqli_stmt_bind_result_do_bind()
525 if (!(stmt->result.buf[ofs].buflen = stmt->stmt->fields[ofs].max_length)) in mysqli_stmt_bind_result_do_bind()
526 ++stmt->result.buf[ofs].buflen; in mysqli_stmt_bind_result_do_bind()
528 stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); in mysqli_stmt_bind_result_do_bind()
530 bind[ofs].buffer = stmt->result.buf[ofs].val; in mysqli_stmt_bind_result_do_bind()
531 bind[ofs].is_null = &stmt->result.is_null[ofs]; in mysqli_stmt_bind_result_do_bind()
532 bind[ofs].buffer_length = stmt->result.buf[ofs].buflen; in mysqli_stmt_bind_result_do_bind()
533 bind[ofs].length = &stmt->result.buf[ofs].output_len; in mysqli_stmt_bind_result_do_bind()
548 if (stmt->result.buf[i].val) { in mysqli_stmt_bind_result_do_bind()
549 efree(stmt->result.buf[i].val); in mysqli_stmt_bind_result_do_bind()
553 efree(stmt->result.buf); in mysqli_stmt_bind_result_do_bind()
555 stmt->result.var_cnt = var_cnt; in mysqli_stmt_bind_result_do_bind()
556 stmt->result.vars = safe_emalloc((var_cnt), sizeof(zval), 0); in mysqli_stmt_bind_result_do_bind()
558 ZVAL_COPY(&stmt->result.vars[i], &args[i]); in mysqli_stmt_bind_result_do_bind()
769 MYSQL_RES *result; local
777 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
779 if (mysqli_result_is_unbuffered(result)) {
784 if (offset < 0 || (uint64_t)offset >= mysql_num_rows(result)) {
788 mysql_data_seek(result, offset);
960 for (i = 0; i < stmt->result.var_cnt; i++) {
961 if (stmt->result.buf[i].type == IS_STRING) {
962 memset(stmt->result.buf[i].val, 0, stmt->result.buf[i].buflen);
971 for (i = 0; i < stmt->result.var_cnt; i++) {
972 zval *result; local
974 if (Z_ISREF(stmt->result.vars[i])) {
975 result = &stmt->result.vars[i];
980 if (!stmt->result.is_null[i]) {
981 switch (stmt->result.buf[i].type) {
987 uval= *(unsigned int *) stmt->result.buf[i].val;
1000 ZEND_TRY_ASSIGN_REF_STRINGL(result, tmp, 10);
1007 ZEND_TRY_ASSIGN_REF_LONG(result, *(unsigned int *)stmt->result.buf[i].val);
1009 ZEND_TRY_ASSIGN_REF_LONG(result, *(int *)stmt->result.buf[i].val);
1019 dval = mysql_float_to_double(*(float *)stmt->result.buf[i].val,
1023 dval = *((double *)stmt->result.buf[i].val);
1026 ZEND_TRY_ASSIGN_REF_DOUBLE(result, dval);
1038 switch (stmt->result.buf[i].output_len) {
1039 case 8:llval = (my_ulonglong) bit_uint8korr(stmt->result.buf[i].val);break;
1040 case 7:llval = (my_ulonglong) bit_uint7korr(stmt->result.buf[i].val);break;
1041 case 6:llval = (my_ulonglong) bit_uint6korr(stmt->result.buf[i].val);break;
1042 case 5:llval = (my_ulonglong) bit_uint5korr(stmt->result.buf[i].val);break;
1043 case 4:llval = (my_ulonglong) bit_uint4korr(stmt->result.buf[i].val);break;
1044 case 3:llval = (my_ulonglong) bit_uint3korr(stmt->result.buf[i].val);break;
1045 case 2:llval = (my_ulonglong) bit_uint2korr(stmt->result.buf[i].val);break;
1046 case 1:llval = (my_ulonglong) uint1korr(stmt->result.buf[i].val);break;
1051 llval= *(my_ulonglong *) stmt->result.buf[i].val;
1067 ZEND_TRY_ASSIGN_REF_STRING(result, tmp);
1069 ZEND_TRY_ASSIGN_REF_LONG(result, llval);
1075 … ZEND_TRY_ASSIGN_REF_STRINGL(result, stmt->result.buf[i].val, stmt->stmt->bind[i].buffer_length);
1080 … ZEND_TRY_ASSIGN_REF_STRINGL(result, stmt->result.buf[i].val, stmt->result.buf[i].output_len);
1088 ZEND_TRY_ASSIGN_REF_NULL(result);
1186 MYSQL_RES *result; local
1194 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1196 if (!(field = mysql_fetch_field(result))) {
1209 MYSQL_RES *result; local
1219 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1222 num_fields = mysql_num_fields(result);
1225 const MYSQL_FIELD *field = mysql_fetch_field_direct(result, i);
1239 MYSQL_RES *result; local
1248 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1250 if (offset < 0 || offset >= (zend_long) mysql_num_fields(result)) {
1255 if (!(field = mysql_fetch_field_direct(result,offset))) {
1268 MYSQL_RES *result; local
1281 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1283 if (!(ret = mysql_fetch_lengths(result))) {
1288 num_fields = mysql_num_fields(result);
1326 MYSQL_RES *result; local
1333 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1335 if (fieldnr < 0 || (uint32_t)fieldnr >= mysql_num_fields(result)) {
1340 mysql_field_seek(result, fieldnr);
1349 MYSQL_RES *result; local
1355 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1357 RETURN_LONG(mysql_field_tell(result));
1365 MYSQL_RES *result; local
1371 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1373 mysqli_free_result(result, FALSE);
1660 MYSQL_RES *result; local
1666 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1668 RETURN_LONG(mysql_num_fields(result));
1676 MYSQL_RES *result; local
1682 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
1684 if (mysqli_result_is_unbuffered_and_not_everything_is_fetched(result)) {
1689 MYSQLI_RETURN_LONG_INT(mysql_num_rows(result));
2496 MYSQL_RES *result; local
2505 if (!(result = mysql_stmt_result_metadata(stmt->stmt))){
2511 mysqli_resource->ptr = (void *)result;
2591 MYSQL_RES *result; local
2602result = flags & MYSQLI_STORE_RESULT_COPY_DATA? mysqlnd_store_result_ofs(mysql->mysql) : mysqlnd_s…
2604 result = mysql_store_result(mysql->mysql);
2606 if (!result) {
2615 mysqli_resource->ptr = (void *)result;
2650 MYSQL_RES *result; local
2659 if (!(result = mysql_use_result(mysql->mysql))) {
2668 mysqli_resource->ptr = (void *)result;