Hi can someone shed some light on this problem I'm having please?

2 tables

SHOWS_ARCHIVE (TABLE 1)

ID
SHOW_ID
AUTHOR

SHOWS (TABLE 2)

ID

When the member logs in they are a loud to see their shows because of the $author permissions;

if ($_SESSION['MEMBER_PERM'] == "2")
					{
$author = $_SESSION['MEMBER_ID'];

$sql = mysql_query("SELECT * FROM show_archive WHERE author = $author");
					}

but I want to do is see the results using the SHOWS table ID as well. ie

if ($_SESSION['MEMBER_PERM'] == "2")
					{
$author = $_SESSION['MEMBER_ID'];

$sql = mysql_query("SELECT * FROM show_archive WHERE author = $author AND show_id = `shows` id");
					}

Hi,
Try the following:

if ($_SESSION['MEMBER_PERM'] == "2")
  {
     $author = $_SESSION['MEMBER_ID'];

$sql = mysql_query("SELECT *, * FROM show_archive, shows WHERE author = $author AND show_id = `shows` id");
					}

That should help you retrieve data from 2 tables at the same time. Let us know how it works.

Found the solution!

SELECT * FROM show_archive, shows WHERE show_archive.show_id = shows.id