Lines Matching refs:pgsql_result
1129 PGresult *pgsql_result; in PHP_FUNCTION() local
1158 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
1159 PQclear(pgsql_result); in PHP_FUNCTION()
1165 pgsql_result = PQexec(pgsql, query); in PHP_FUNCTION()
1167 PQclear(pgsql_result); in PHP_FUNCTION()
1169 pgsql_result = PQexec(pgsql, query); in PHP_FUNCTION()
1172 if (pgsql_result) { in PHP_FUNCTION()
1173 status = PQresultStatus(pgsql_result); in PHP_FUNCTION()
1184 PQclear(pgsql_result); in PHP_FUNCTION()
1189 if (pgsql_result) { in PHP_FUNCTION()
1193 pg_result->result = pgsql_result; in PHP_FUNCTION()
1196 PQclear(pgsql_result); in PHP_FUNCTION()
1228 PGresult *pgsql_result; in PHP_FUNCTION() local
1260 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
1261 PQclear(pgsql_result); in PHP_FUNCTION()
1290 pgsql_result = PQexecParams(pgsql, query, num_params, in PHP_FUNCTION()
1293 PQclear(pgsql_result); in PHP_FUNCTION()
1295 pgsql_result = PQexecParams(pgsql, query, num_params, in PHP_FUNCTION()
1299 if (pgsql_result) { in PHP_FUNCTION()
1300 status = PQresultStatus(pgsql_result); in PHP_FUNCTION()
1313 PQclear(pgsql_result); in PHP_FUNCTION()
1318 if (pgsql_result) { in PHP_FUNCTION()
1322 pg_result->result = pgsql_result; in PHP_FUNCTION()
1325 PQclear(pgsql_result); in PHP_FUNCTION()
1341 PGresult *pgsql_result; in PHP_FUNCTION() local
1373 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
1374 PQclear(pgsql_result); in PHP_FUNCTION()
1380 pgsql_result = PQprepare(pgsql, stmtname, query, 0, NULL); in PHP_FUNCTION()
1382 PQclear(pgsql_result); in PHP_FUNCTION()
1384 pgsql_result = PQprepare(pgsql, stmtname, query, 0, NULL); in PHP_FUNCTION()
1387 if (pgsql_result) { in PHP_FUNCTION()
1388 status = PQresultStatus(pgsql_result); in PHP_FUNCTION()
1399 PQclear(pgsql_result); in PHP_FUNCTION()
1404 if (pgsql_result) { in PHP_FUNCTION()
1408 pg_result->result = pgsql_result; in PHP_FUNCTION()
1411 PQclear(pgsql_result); in PHP_FUNCTION()
1430 PGresult *pgsql_result; in PHP_FUNCTION() local
1462 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
1463 PQclear(pgsql_result); in PHP_FUNCTION()
1491 pgsql_result = PQexecPrepared(pgsql, stmtname, num_params, in PHP_FUNCTION()
1494 PQclear(pgsql_result); in PHP_FUNCTION()
1496 pgsql_result = PQexecPrepared(pgsql, stmtname, num_params, in PHP_FUNCTION()
1500 if (pgsql_result) { in PHP_FUNCTION()
1501 status = PQresultStatus(pgsql_result); in PHP_FUNCTION()
1514 PQclear(pgsql_result); in PHP_FUNCTION()
1519 if (pgsql_result) { in PHP_FUNCTION()
1523 pg_result->result = pgsql_result; in PHP_FUNCTION()
1526 PQclear(pgsql_result); in PHP_FUNCTION()
1541 PGresult *pgsql_result; in php_pgsql_get_result_info() local
1550 pgsql_result = pg_result->result; in php_pgsql_get_result_info()
1554 RETVAL_LONG(PQntuples(pgsql_result)); in php_pgsql_get_result_info()
1557 RETVAL_LONG(PQnfields(pgsql_result)); in php_pgsql_get_result_info()
1560 RETVAL_LONG(atoi(PQcmdTuples(pgsql_result))); in php_pgsql_get_result_info()
1768 PGresult *pgsql_result; in php_pgsql_get_field_info() local
1785 pgsql_result = pg_result->result; in php_pgsql_get_field_info()
1787 if (field >= PQnfields(pgsql_result)) { in php_pgsql_get_field_info()
1794 RETURN_STRING(PQfname(pgsql_result, (int)field)); in php_pgsql_get_field_info()
1797 RETURN_LONG(PQfsize(pgsql_result, (int)field)); in php_pgsql_get_field_info()
1800 RETURN_STR(get_field_name(pg_result->conn, PQftype(pgsql_result, (int)field))); in php_pgsql_get_field_info()
1804 oid = PQftype(pgsql_result, (int)field); in php_pgsql_get_field_info()
1846 PGresult *pgsql_result; in PHP_FUNCTION() local
1856 pgsql_result = pg_result->result; in PHP_FUNCTION()
1858 RETURN_LONG(PQfnumber(pgsql_result, field)); in PHP_FUNCTION()
1892 PGresult *pgsql_result; in PHP_FUNCTION() local
1926 pgsql_result = pg_result->result; in PHP_FUNCTION()
1933 if (pgsql_row >= PQntuples(pgsql_result)) { in PHP_FUNCTION()
1942 if (row >= PQntuples(pgsql_result)) { in PHP_FUNCTION()
1950 field_offset = field_arg_to_offset(pgsql_result, field_name, field_offset, ZEND_NUM_ARGS()); in PHP_FUNCTION()
1955 if (PQgetisnull(pgsql_result, pgsql_row, field_offset)) { in PHP_FUNCTION()
1958 RETVAL_STRINGL(PQgetvalue(pgsql_result, pgsql_row, field_offset), in PHP_FUNCTION()
1959 PQgetlength(pgsql_result, pgsql_row, field_offset)); in PHP_FUNCTION()
1968 PGresult *pgsql_result; in php_pgsql_fetch_hash() local
2011 pgsql_result = pg_result->result; in php_pgsql_fetch_hash()
2014 if (row >= PQntuples(pgsql_result)) { in php_pgsql_fetch_hash()
2024 if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) { in php_pgsql_fetch_hash()
2031 for (i = 0, num_fields = PQnfields(pgsql_result); i < num_fields; i++) { in php_pgsql_fetch_hash()
2032 if (PQgetisnull(pgsql_result, pgsql_row, i)) { in php_pgsql_fetch_hash()
2037 field_name = PQfname(pgsql_result, i); in php_pgsql_fetch_hash()
2041 char *element = PQgetvalue(pgsql_result, pgsql_row, i); in php_pgsql_fetch_hash()
2050 field_name = PQfname(pgsql_result, i); in php_pgsql_fetch_hash()
2121 PGresult *pgsql_result; in PHP_FUNCTION() local
2137 pgsql_result = pg_result->result; in PHP_FUNCTION()
2140 php_pgsql_result2array(pgsql_result, return_value, result_type); in PHP_FUNCTION()
2148 PGresult *pgsql_result; in PHP_FUNCTION() local
2168 pgsql_result = pg_result->result; in PHP_FUNCTION()
2170 num_fields = PQnfields(pgsql_result); in PHP_FUNCTION()
2178 if ((pg_numrows = PQntuples(pgsql_result)) <= 0) { in PHP_FUNCTION()
2183 if (PQgetisnull(pgsql_result, pg_row, (int)colno)) { in PHP_FUNCTION()
2186 add_next_index_string(return_value, PQgetvalue(pgsql_result, pg_row, (int)colno)); in PHP_FUNCTION()
2227 PGresult *pgsql_result; in php_pgsql_data_info() local
2262 pgsql_result = pg_result->result; in php_pgsql_data_info()
2269 if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) { in php_pgsql_data_info()
2277 if (row >= PQntuples(pgsql_result)) { in php_pgsql_data_info()
2285 field_offset = field_arg_to_offset(pgsql_result, field_name, field_offset, ZEND_NUM_ARGS()); in php_pgsql_data_info()
2292 RETVAL_LONG(PQgetlength(pgsql_result, pgsql_row, field_offset)); in php_pgsql_data_info()
2295 RETVAL_LONG(PQgetisnull(pgsql_result, pgsql_row, field_offset)); in php_pgsql_data_info()
2352 PGresult *pgsql_result; in PHP_FUNCTION() local
2362 pgsql_result = pg_result->result; in PHP_FUNCTION()
2364 oid = PQoidValue(pgsql_result); in PHP_FUNCTION()
3302 PGresult *pgsql_result; in PHP_FUNCTION() local
3331 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
3332 PQclear(pgsql_result); in PHP_FUNCTION()
3334 pgsql_result = PQexec(pgsql, query); in PHP_FUNCTION()
3340 if (pgsql_result) { in PHP_FUNCTION()
3341 status = PQresultStatus(pgsql_result); in PHP_FUNCTION()
3348 if (pgsql_result) { in PHP_FUNCTION()
3351 PQclear(pgsql_result); in PHP_FUNCTION()
3371 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
3372 PQclear(pgsql_result); in PHP_FUNCTION()
3375 PQclear(pgsql_result); in PHP_FUNCTION()
3380 PQclear(pgsql_result); in PHP_FUNCTION()
3388 static zend_result pgsql_copy_from_query(PGconn *pgsql, PGresult *pgsql_result, zval *value) in pgsql_copy_from_query() argument
3424 PGresult *pgsql_result; in PHP_FUNCTION() local
3452 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
3453 PQclear(pgsql_result); in PHP_FUNCTION()
3455 pgsql_result = PQexec(pgsql, query); in PHP_FUNCTION()
3462 if (pgsql_result) { in PHP_FUNCTION()
3463 status = PQresultStatus(pgsql_result); in PHP_FUNCTION()
3470 if (pgsql_result) { in PHP_FUNCTION()
3471 PQclear(pgsql_result); in PHP_FUNCTION()
3475 if (pgsql_copy_from_query(pgsql, pgsql_result, value) == FAILURE) { in PHP_FUNCTION()
3492 if (pgsql_copy_from_query(pgsql, pgsql_result, value) == FAILURE) { in PHP_FUNCTION()
3505 while ((pgsql_result = PQgetResult(pgsql))) { in PHP_FUNCTION()
3506 if (PGRES_COMMAND_OK != PQresultStatus(pgsql_result)) { in PHP_FUNCTION()
3510 PQclear(pgsql_result); in PHP_FUNCTION()
3516 PQclear(pgsql_result); in PHP_FUNCTION()
3522 PQclear(pgsql_result); in PHP_FUNCTION()
3697 PGresult *pgsql_result; in PHP_FUNCTION() local
3706 pgsql_result = pg_result->result; in PHP_FUNCTION()
3707 if (!pgsql_result) { in PHP_FUNCTION()
3711 err = PQresultErrorMessage(pgsql_result); in PHP_FUNCTION()
3721 PGresult *pgsql_result; in PHP_FUNCTION() local
3731 pgsql_result = pg_result->result; in PHP_FUNCTION()
3732 if (!pgsql_result) { in PHP_FUNCTION()
3746 field = PQresultErrorField(pgsql_result, (int)fieldcode); in PHP_FUNCTION()
3849 PGresult *pgsql_result; in php_pgsql_do_async() local
3878 while ((pgsql_result = PQgetResult(pgsql))) { in php_pgsql_do_async()
3879 PQclear(pgsql_result); in php_pgsql_do_async()
4265 PGresult *pgsql_result; in PHP_FUNCTION() local
4276 pgsql_result = PQgetResult(pgsql); in PHP_FUNCTION()
4277 if (!pgsql_result) { in PHP_FUNCTION()
4285 pg_result->result = pgsql_result; in PHP_FUNCTION()
4296 PGresult *pgsql_result; in PHP_FUNCTION() local
4307 pgsql_result = pg_result->result; in PHP_FUNCTION()
4310 status = PQresultStatus(pgsql_result); in PHP_FUNCTION()
4314 RETURN_STRING(PQcmdStatus(pgsql_result)); in PHP_FUNCTION()
6322 PGresult *pgsql_result; in PHP_FUNCTION() local
6338 pgsql_result = PQclosePrepared(link->conn, ZSTR_VAL(stmt)); in PHP_FUNCTION()
6340 if (PQresultStatus(pgsql_result) != PGRES_COMMAND_OK) { in PHP_FUNCTION()
6347 pg_handle->result = pgsql_result; in PHP_FUNCTION()