|
Posted by Jerry Stuckle on 11/15/05 16:36
Jim Hernandez wrote:
> This has set me back a couple of days now and I could really use some
> help or at least a shove in the right direction.
>
> What I'm trying to do is list reviews in a database on a page, by
> artist (byartist.php). The first step is pulling each artist and
> listing them alphabetically. If the artist has more than one album
> reviewed, they should still only show up once, so I need to check each
> row of the recordset, and check the artistname against a variable or
> something, and if it exists, to just skip it and move on to the next row.
> Then I need to list the albums reviewed under each respective artists
> name and use them as links with url parameters to the respective review
> pages.
>
> I've got the recordset down per some advice from another newsgroup, and
> I'm fairly certain its correct for what I need to do.
> <?php require_once('conntest.php'); ?>
> <?php
> mysql_select_db($database_test, $test);
> $query_byartist = "select artists.artistid, artists.artistname,
> areviews.albumid, areviews.atitle from artists join areviews on
> artists.artistid = areviews.artistid";
> $byartist = mysql_query($query_byartist, $test) or die(mysql_error());
> $row_byartist = mysql_fetch_assoc($byartist);
> $totalRows_byartist = mysql_num_rows($byartist);
> ?>
>
> The php example I was given for pulling the results was kind of
> half-effort and not enough for me to really see what was going on,
> understand it and build upon it. I'm (obviously) just starting out with
> php/mysql and I'm pretty good at building upon something in front of me
> and figuring it out, just need a little help because I've tried it over
> and over and to no avail, I wind up with syntax errors.
> Sorry for the wordy post, I didnt want to skimp. Thanks for any help or
> advice or any points in the right direction. I've got about 3 days of
> progress to catch up on
OK, looks like you're off to a decent start. You're splitting the
albums and reviews into separate tables, which is good.
So exactly what have you tried which causes the syntax errors? What is
the exact message you're getting?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|