Page 1 of 1

Function Problem

Posted: Fri Jan 16, 2004 12:13 am
by FranK84
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.

Code: Select all

<?php do &#123; ?>
	  <tr>
	  	  	  <?php
	  if($couleur == false) &#123;
	    $couleur = true;
		$code = "#585C77";
		&#125; else &#123;
		$couleur = false;
		$code = "#131D36";
		&#125;
		?>
        <td width="43%" bgcolor="<? echo $code; ?>" height="25"><font color="#FFFFFF"><?php echo $row_Edit_Delete&#1111;'rev_title']; ?></font></td>
        <td width="20%" bgcolor="<? echo $code; ?>" height="25"><font color="#FFFFFF"><?php echo $row_Edit_Delete&#1111;'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&#1111;'rev_id']; ?>">Edit</a></center></font>
		</td>
        <?php &#125; while ($row_Edit_Delete = mysql_fetch_assoc($Edit_Delete)); ?>
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.

Posted: Fri Jan 16, 2004 3:18 am
by McGruff