Function Problem
Posted: Fri Jan 16, 2004 12:13 am
Hello everyone. I have a big problem with a PHP function that allows me to go into two tables. I'm a beginner with PHP by the way.
Okay, let me give you a part of my tables, which is only the variables I need.
review
rev_id
rev_title
rev_console
rev_exteriorid
outsiders
mem_id
mem_nick
mem_name
Okay, first let me tell you that I have NO CHOICE but having two tables. Now, I need to show up all my reviews so I do this.
My big problem is where you see all the stars. I need to show up THE NAME OF THE CONTRIBUTOR. Not is ID or anything. So with the rev_exteriorid, I'm supposed to go in the outsiders table to compare to the mem_id. Once it's equal, well the name shows up. I've tried various methods to do this, even with a do within a do... but I don't seem to be able to get it work. I wonder if you have any suggestions.
Thanks in advance.
Okay, let me give you a part of my tables, which is only the variables I need.
review
rev_id
rev_title
rev_console
rev_exteriorid
outsiders
mem_id
mem_nick
mem_name
Okay, first let me tell you that I have NO CHOICE but having two tables. Now, I need to show up all my reviews so I do this.
Code: Select all
<?php do { ?>
<tr>
<?php
if($couleur == false) {
$couleur = true;
$code = "#585C77";
} else {
$couleur = false;
$code = "#131D36";
}
?>
<td width="43%" bgcolor="<? echo $code; ?>" height="25"><font color="#FFFFFF"><?php echo $row_Edit_Deleteї'rev_title']; ?></font></td>
<td width="20%" bgcolor="<? echo $code; ?>" height="25"><font color="#FFFFFF"><?php echo $row_Edit_Deleteї'rev_console']; ?></font></td>
<td width="27%" bgcolor="<? echo $code; ?>" height="25"><font color="#FFFFFF"> ***************
</font></td>
<td width="10%" bgcolor="<? echo $code; ?>" height="25"><font color="#FFFFFF"><a href="http://www.thevgnation.com/admin/index.php?id=adm_index.php&Mode=view&Option=sel_ed_rev&Revid=<? echo $row_Edit_Deleteї'rev_id']; ?>">Edit</a></center></font>
</td>
<?php } while ($row_Edit_Delete = mysql_fetch_assoc($Edit_Delete)); ?>Thanks in advance.