I appologise for not understanding the code and I am trying to learn. I have a program that does that for me.

The code for the viewing is:
// mm: build the query based on current member's permissions
if($perm[2]==3){ // view all
$x->Query = "select YouthTournamentEntry.youth_id as 'ID', YouthTournamentEntry.Date as 'Date', YouthTournamentEntry.Age as 'Age', YouthTournamentEntry.Class as 'Class', YouthTournamentEntry.Location as 'Location', YouthTournamentEntry.Website as 'Website', YouthTournamentEntry.Tournament_Name as 'Tournament Name', YouthTournamentEntry.Approval as 'Approval', YouthTournamentEntry.Format as 'Format', CONCAT('$', YouthTournamentEntry.Fee) as 'Fee', YouthTournamentEntry.Contact as 'Contact', YouthTournamentEntry.Email as 'Email', YouthTournamentEntry.Telephone as 'Telephone' from YouthTournamentEntry, membership_userrecords where YouthTournamentEntry.youth_id=membership_userrecor ds.pkValue and membership_userrecords.tableName='YouthTournamentE ntry' and membership_userrecords.memberID='".getLoggedMember ID()."'";

I have two sites using the same database. The tournament entry site defaults to not aproved and I would like it to not show up on the list until admin approves it. On the admin site they can select not approved or approved and when it is approved I would like the file to appear in the list view.

I think it is something like:
SELECT YouthTournamentEntry.Approval, from YouthTournamentEntry_table where YouthTournamentEntry.Approval = 'approved';

Or I have tried:
$result = mysql_query("SELECT * FROM YouthTournamentEntry
WHERE Approval='Aproved'");
while($row = $x->Query($result)); }
$x->row =


But i don't know where to put the code or if the code is even correct.
Thanks