Re: Re: repeating data from one column until data from another column changes

From: Date: Tue, 04 May 2004 22:59:06 +0000
Subject: Re: Re: repeating data from one column until data from another column changes
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-185363@lists.php.net to get a copy of this message
----- Original Message ----- > > start code at top of document: > > <?php require_once('Connections/jpike.php'); ?> > > <?php > > mysql_select_db($database_jpike, $jpike); > > $query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(date) = ' . > date('Y') > > . ' AND MONTH(date) = ' . date('m') . ' ORDER BY sort DESC'; > > $rsENews = mysql_query($query_rsENews, $jpike) or die(mysql_error()); > > $row_rsENews = mysql_fetch_assoc($rsENews); > > The above line is already fetching the first row from the result. Is this > what you want at this point of the script? If not put // in front to out > ocmment it. > > > $totalRows_rsENews = mysql_num_rows($rsENews); > > Please print out $totalRows_rsENews and post the value. > > Have you checked if you have articles with a May date? > > Torsten the above code is what dreamweaver writes when I create a connection to the table in the database... there 192 records total and no may records as of yet. I do not understand why that is pertinent...? there are 10 articles listed for april....but every month varies.

« previous php.general (#185363) next »