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

From: Date: Tue, 04 May 2004 22:43:09 +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 11  Groups: php.general 
Request: Send a blank email to php-general+get-185369@lists.php.net to get a copy of this message
If you have no may articles then there will be no records returned. Just change the . date('m') to the actualy month you want if not the current month. ----- Original Message ----- From: "msa" <melissa@maddesignusa.com> To: <php-general@lists.php.net> Sent: Tuesday, May 04, 2004 3:59 PM Subject: Re: [PHP] Re: repeating data from one column until data from another column changes > ----- 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. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#185369) next »