Skip to main content
January 12, 2010
Question

read entry from 2 different recordsets

  • January 12, 2010
  • 1 reply
  • 683 views

I have 2 recordset. $row_rsArtist has all the artists (id, nameArtist) $row_rsProject has the projects (id, cat_id, nameProject).

To link the artist to a specific project I put $row_rsArtist['cat_id'] the same number as $row_rsProject['id'] .

Now I need to read the name of the Artist in my list of Projects, but I don't know how to do this!!?

<?php do { ?>
<a href="fotos.php?v=<?php echo $row_rsProject['cat_id']; ?>">HERE SHOULD BE the name of the Artist from rsArtist [nameArtist]</a><br />
<?php } while ($row_rsProject = mysql_fetch_assoc($rsProject)); ?>

Thank you for any help.

This topic has been closed for replies.

1 reply

Participating Frequently
January 12, 2010

Do you need two recordsets? Why can't you use a single recordset with data from both tables?

January 12, 2010

I don't know how to do that... ?

Participating Frequently
January 12, 2010

>I don't know how to do that... ?

I mean create a recordset with SQL that joins the two tables. You know how to do that, right?