Re: newbie: why doesn't this work?

From: Date: Mon, 21 May 2001 22:22:11 +0000
Subject: Re: newbie: why doesn't this work?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9514@lists.php.net to get a copy of this message
just at a quick glance I see a couple things I would try changing at the end of your "for" loop you have a closing brace but I don't see an opening brace anywhere, that should throw things. Also in the conditions of your "for" loop you have "++$count" which I haven't really seen before. Would the standard "$count++" be better? ""twopeak"" <twopeak@hotmail.com> wrote in message news:9ebrhn$a39$1@toye.p.sourceforge.net... > this works, but it doesn't like to retrieve the data, the intention of this > is that it just returns all the links... > but it loves to return errors... > > =========================================== > <?php > $link = mysql_connect($path,$log,$pass) OR DIE("can't connect"); > mysql_select_db("blackstars", $link) or die( "can't select db"); > > $query = "SELECT * FROM persoon"; > $result = mysql_query($query); > for ($count = 1; $row = mysql_fetch_object ($result) ; ++$count) > > > echo "$count : $row->voornaam , $row->achternaam <br>"; > } > ?> > =================================================== > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#9514) next »