Bug #17981 Updated: list() unable to set back boolean trigger
| From: | sniper@php.net | Date: | Tue, 25 Jun 2002 21:04:57 +0000 |
| Subject: | Bug #17981 Updated: list() unable to set back boolean trigger | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12080@lists.php.net to get a copy of this message | ||
ID: 17981
Updated by: sniper@php.net
Reported By: a.nichau@digitale-zeiten.de
-Status: Open
+Status: Bogus
Bug Type: *Programming Data Structures
Operating System: Linux 2.4.18
PHP Version: 4.1.2
New Comment:
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-06-25 16:45:51] a.nichau@digitale-zeiten.de
I tried several methods to read out the three newest articles in our
cms separated from other news tables. In short I query the first news
table list the output and query the next table.
<?
$sql="SELECT CONCAT(b.title,' ',b.link) as
titel,b.id,DATE_FORMAT(b.Creation_Date,'d.m.Y') as datum FROM news AS
b,members AS a WHERE a.id='$id' AND b.Author_Name=CONCAT(a.vorname,'
',a.name) ORDER BY Modify_Stamp DESC LIMIT 3";
$rs=mysql_query($sql) or die(mysql_error());
while(list($titel,$id,$datum) = mysql_fetch_array($rs)){?>
<?=$datum?>, <a href="/magazin/<? echo $id?>/"
target="_blank"><?=$titel?></a><br/>
<? } ?>
<hr noshade size="1"/>
<?
mysql_free_result($rs);
mysql_close();
include(CONNECT);
$sql="SELECT b.title as
titel,b.id,DATE_FORMAT(b.Creation_Date,'d.m.Y') as datum FROM news_box
AS b,members AS a WHERE a.id='$id' AND b.Author_Name=CONCAT(a.vorname,'
',a.name) ORDER BY Modify_Stamp DESC LIMIT 3";
$rs2=mysql_query($sql) or die(mysql_error());
while($myrow = mysql_fetch_array($rs2)){?>
<?=$myrow[datum]?>, <a href="/journal/<? echo $myrow[id]?>/"
target="_blank"><?=$myrow[titel]?></a><br/>
<? }
mysql_close();
} ?>
The Bug is that the second loop isn´t started due to the loop-trigger
already set to false. Even renaming variables and using different db
connections didn´t solve the problem. Queries are ok and separated from
another they bring the right resultset. Hope this was clear enough for
you.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17981&edit=1