You are here: Re: question about implementing a recordset « PHP SQL « IT news, forums, messages
Re: question about implementing a recordset

Posted by Jim Hernandez on 11/12/05 08:22

nevermind i sorted out a proper mysql statement and i turned up with this
+----------+------------------+---------+------------------------+
| artistid | artistname | albumid | atitle |
+----------+------------------+---------+------------------------+
| 1 | blah | 1 | blah album |
| 4 | cab | 2 | cab album |
| 3 | dab | 3 | dab album |
| 2 | fab | 4 | fab album |
| 2 | fab | 5 | fab album 2 |
+----------+------------------+---------+------------------------+

$oldArtistID = false;
for each row {
if($row['artistid'] != $oldArtistID) {
//it's a new artist, so show their name and stuff
$oldArtistID = $row['artistid'];
}

if you could just give me a description of how $oldartistID comes into
play? i think i understand the rest of it.
for every row it checks artist id against oldartistid and if its new it
lists the artist, if not then it skips it and moves on to where i'd then
place some code that will code each albumrow as a link with a php echo
calling the link with the url parameter. no?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация