note 21677 added to function.odbc-fetch-into

From: Date: Thu, 23 May 2002 00:03:36 +0000
Subject: note 21677 added to function.odbc-fetch-into
Groups: php.notes 
Request: Send a blank email to php-notes+get-30924@lists.php.net to get a copy of this message
Here's a workaround to ensure your program works regardless of which version of PHP you're running. The silly eval() process is needed to prevent Warning messages in newer versions. <?php $php_errormsg = ''; if ( phpversion() < '4.2.0') { $Code = 'if ( !@odbc_fetch_into($Results, $Row, &$Temp) AND $php_errormsg != "") {'; $Code .= ' echo $php_errormsg;'; $Code .= ' exit();'; $Code .= '}'; eval($Code); } else { if ( !@odbc_fetch_into($Results, $Temp) AND $php_errormsg != '') { echo $php_errormsg; exit(); } } ?> -- http://www.php.net/manual/en/function.odbc-fetch-into.php http://master.php.net/manage/user-notes.php?action=edit+21677 http://master.php.net/manage/user-notes.php?action=delete+21677 http://master.php.net/manage/user-notes.php?action=reject+21677

« previous php.notes (#30924) next »