|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-01-21 19:48 UTC] alejosimon at yahoo dot com dot ar
Description:
------------
Actualmente estoy usando PHP 5.1.2 for win32 en windows 2k3, y experimento un bucle interminable.
Puede ser esto un bug ???
Saludos.
Reproduce code:
---------------
$db_res = db_query( $db, " SELECT * FROM clientes " ) ;
while ( $db_reg = db_fetch_array( $db_res ) ) {
echo "1ro: " . $db_reg['cliente'] . "<br>" ;
db_next( $db_res ) ;
$db_reg = db_current( $db_res ) ;
echo "2do: " . $db_reg['cliente'] . "<br>" ;
db_prev( $db_res ) ; // aca esta el problema.
}
Expected result:
----------------
sumar un registro para verificarlo, y luego retroceder para seguir con el while.
Actual result:
--------------
bucle interminable.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 08:00:01 2025 UTC |
SORRY 2 :) !!! all functions with prfix "db_" are equivalent to "sqlite_" functions. Rewrite the code. $db_res = sqlite_query( $db, " SELECT * FROM clientes " ) ; while ( $db_reg = sqlite_fetch_array( $db_res ) ) { echo "1ro: " . $db_reg['cliente'] . "<br>" ; sqlite_next( $db_res ) ; $db_reg = sqlite_current( $db_res ) ; echo "2do: " . $db_reg['cliente'] . "<br>" ; sqlite_prev( $db_res ) ; // aca esta el problema. }