Query: odbc_next_result
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
ODBC_NEXT_RESULT(3) 1 ODBC_NEXT_RESULT(3) odbc_next_result - Checks if multiple results are availableSYNOPSISbool odbc_next_result (resource $result_id)DESCRIPTIONChecks if there are more result sets available as well as allowing access to the next result set via odbc_fetch_array(3), odbc_fetch_row(3), odbc_result(3), etc.PARAMETERSo $result_id - The result identifier.RETURN VALUESReturns TRUE if there are more result sets, FALSE otherwise.EXAMPLESExample #1 odbc_next_result(3) <?php $r_Connection = odbc_connect($dsn, $username, $password); $s_SQL = <<<END_SQL SELECT 'A' SELECT 'B' SELECT 'C' END_SQL; $r_Results = odbc_exec($r_Connection, $s_SQL); $a_Row1 = odbc_fetch_array($r_Results); $a_Row2 = odbc_fetch_array($r_Results); echo "Dump first result set"; var_dump($a_Row1, $a_Row2); echo "Get second results set "; var_dump(odbc_next_result($r_Results)); $a_Row1 = odbc_fetch_array($r_Results); $a_Row2 = odbc_fetch_array($r_Results); echo "Dump second result set "; var_dump($a_Row1, $a_Row2); echo "Get third results set "; var_dump(odbc_next_result($r_Results)); $a_Row1 = odbc_fetch_array($r_Results); $a_Row2 = odbc_fetch_array($r_Results); echo "Dump third result set "; var_dump($a_Row1, $a_Row2); echo "Try for a fourth result set "; var_dump(odbc_next_result($r_Results)); ?> The above example will output: Dump first result set array(1) { ["A"]=> string(1) "A" } bool(false) Get second results set bool(true) Dump second result set array(1) { ["B"]=> string(1) "B" } bool(false) Get third results set bool(true) Dump third result set array(1) { ["C"]=> string(1) "C" } bool(false) Try for a fourth result set bool(false) PHP Documentation Group ODBC_NEXT_RESULT(3)
Related Man Pages |
---|
splfixedarray(3) - php |
mysqlnd_ms_match_wild(3) - php |
mysqlnd_qc_get_query_trace_log(3) - php |
pg_meta_data(3) - php |
datetime.diff(3) - php |
Similar Topics in the Unix Linux Community |
---|
"echo *.out" - can I separate the results by a new line? |