Re: dividing an mysql_fetched_array...

From: Date: Thu, 08 Feb 2001 13:12:11 +0000
Subject: Re: dividing an mysql_fetched_array...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6478@lists.php.net to get a copy of this message
Hi,, no 3 sql isn't neccessary. you could put an $i = 0 before the whlie loop and increment it at the end of it. Thus you could do it with an if.-caluse: if ($i=0) { ehco "ad"; }. Same thing for ads which go between newsarticle 8 and 9. Good luck otis ""Trond Erling Hundal"" <webmaster@port-industry.com> schrieb im Newsbeitrag news:MIBBLBJEKKHMEDHENEKCMELNCDAA.webmaster@port-industry.com... > Hi there... > I was thinking of dividing a front page displaying 15 newsarticles into > three parts. > The first part, will contain only one article... > Below the first article there will be an ad, before to columns suceeding > this banner displays 2*7 articles... > > how do I do this? > > I know the array has indexes of 0, 1 ,2 ,3 etc etc... > But, of course, I am fetching out several different columns from the db, > title, ingress, date etc etc... > > How do I tell the script to display one the *first* title, and then 7 > more... and then additional 7....? > > I want to avoid doing three sqls... Or is this nescessary? > > > -trond > > > -- > 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 (#6478) next »