PHP 4.0 Bug #6905 Updated: ifx_num_rows has an error

From: Date: Mon, 02 Oct 2000 03:01:41 +0000
Subject: PHP 4.0 Bug #6905 Updated: ifx_num_rows has an error
Groups: php.dev 
Request: Send a blank email to php-dev+get-33941@lists.php.net to get a copy of this message
ID: 6905 Updated by: danny Reported By: sir_john@gmx.de Status: Closed Bug Type: Informix related Assigned To: Comments: From the PHP manual on "ifx_num_rows()": --------------------------------------- ifx_num_rows (3.0.3 - 3.0.16 only, PHP4 ) ifx_num_rows -- Count the rows already *fetched* a query Description int ifx_num_rows (int result_id) Gives the number of rows *fetched* so far for a query with result_id after a ifx_query() or ifx_do() query. ---------------------------------------- Note "already fetched" and "fetched so far". Your example hasn't fetched anything, so ifx_num_rows() has to return 0. Danny --- Previous Comments: --------------------------------------------------------------------------- [2000-09-27 16:40:07] sir_john@gmx.de The result of ifx_num_rows($result) is always 0! <? @$connid=ifx_connect("assdb@ol_assstat", "informix", "xxx") or die("Error"); $result = ifx_query("SELECT * FROM ae ORDER BY idae", $connid) or die("Error"); $a = ifx_num_rows($result); echo $a; // <--- $a is always 0 ifx_free_result($result); ?> --------------------------------------------------------------------------- [2000-09-27 16:35:43] sir_john@gmx.de The result of ifx_num_rows($result) is always 0! <? @$connid=ifx_connect"assdb@ol_assstat", "informix", "xxx") or die("Error"); $result = ifx_query("SELECT * FROM ae ORDER BY idae", $connid) or die("Error"); $a = ifx_num_rows($result); echo $a; // <--- $a is always 0 ifx_free_result($result); ?> --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6905

« previous php.dev (#33941) next »