Jump to content

seperate mysql table with common username


calmchess

Recommended Posts

I need to select data from  3 tables that all have usename as the common data......now after selecting the data i need to arrange it so that all the users relevant data from the 3 tables  is in a table or array or somthing........starts out something like this

 


<?php
$conn = mysql_connect("127.0.0.1", "root", "secret") or die(mysql_error());
mysql_select_db("testsuite",$conn) or die(mysql_error());
////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// 
$result0=mysql_query("select id,name from mprofiles") 
or die(mysql_error());
$row0 = mysql_fetch_array( $result0 );
$current0 = $row0['name'];
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
$result1=mysql_query("select country from members") 
or die(mysql_error());
$row1 = mysql_fetch_array( $result1 );
$current1 = $row1['country'];
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
$result2=mysql_query("select cpm from vfcp_profile") 
or die(mysql_error());
$row2 = mysql_fetch_array( $result2 );
$current2 = $row2['cpm'];
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
echo $current0;
echo $current1;
echo $current2;
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.