note 41993 added to function.odbc-result-all
| From: | php-general at lists dot php dot net | Date: | Wed, 28 Apr 2004 13:51:19 +0000 |
| Subject: | note 41993 added to function.odbc-result-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68953@lists.php.net to get a copy of this message | ||
If you want to assign the data to a session or a variable but found that it is not possible with the
odbc_result_all() because it spit out the data instead. Then you're in for a luck, there is a
different method to do this. Just do this instead, with ob_start(), ob_get_contents() and
ob_end_clean() like this below.
--snip--
$result1 = @odbc_exec($cid,stripslashes($_REQUEST['QueryText']));
//$_SESSION[$SessionTimestamp.'_phpNumRows'] = odbc_num_rows($result1);
//$_SESSION[$SessionTimestamp.'_phpNumFields'] = odbc_num_fields($result1);
ob_start();
odbc_result_all($result1,"class='SqlQueryBox' border='2'
cellpadding='4' cellspacing='0' bordercolor='#009933'");
$_SESSION[$SessionTimestamp.'_phpTableData'] = ob_get_contents();
ob_end_clean();
--snip--
----
Manual Page -- http://www.php.net/manual/en/function.odbc-result-all.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41993
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41993&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41993&report=yes
Search -- http://master.php.net/manage/user-notes.php