Good evening -
thanks in advance for you help!
attached is my query, and html table layout.
I'm trying to query 3 tbles in one select statement, and return the data to html table.
it work before when i had it broken down into three select statements and three results.
[code=php]
$result = mysql_query("se lect a.user_Id, AES_DECRYPT(`a. UEA`, '$userpass') as UEA, `a.UEA` as UEA1, AES_DECRYPT(`a. UEAP`, '$userpass') as UEAP, `a.UEAP` as UEAP1, b.user_Id_fk, b.Fname, c.user_Id_fk, c.Zip from user a, uname b, uzip c");
// create table layout
echo "<table border='1'>
<tr>
<th>UserId</th>
<th>UserName</th>
<th>EncUserName </th>
<th>UserPasswor d</th>
<th>EncUserPass word</th>
<th>UserId</th>
<th>FirstName </th>
<th>UserId</th>
<th>Zip</th>
</tr>";
while ($row = mysql_fetch_arr ay($result))
{
echo "<tr>";
echo "<td>" . $row ['a.user_Id'] . "</td> ";
echo "<td>" . $row ['UEA'] . "</td>";
echo "<td>" . $row ['UEA1'] . "</td>";
echo "<td>" . $row['UEAP'] . "</td>";
echo "<td>" . $row['UEAP1'] . "</td>";
echo "<td>" . $row ['b.user_Id_fk'] . "</td>";
echo "<td>" . $row ['b.Fname'] . "</td>";
echo "<td>" . $row ['c.user_Id_fk'] . "</td>";
echo "<td>" . $row ['c.Zip'] . "</td>";
echo "</tr>";
//echo "<br />";
}
echo "</table>";
mysql_close($co n);[/code]
thanks in advance for you help!
attached is my query, and html table layout.
I'm trying to query 3 tbles in one select statement, and return the data to html table.
it work before when i had it broken down into three select statements and three results.
[code=php]
$result = mysql_query("se lect a.user_Id, AES_DECRYPT(`a. UEA`, '$userpass') as UEA, `a.UEA` as UEA1, AES_DECRYPT(`a. UEAP`, '$userpass') as UEAP, `a.UEAP` as UEAP1, b.user_Id_fk, b.Fname, c.user_Id_fk, c.Zip from user a, uname b, uzip c");
// create table layout
echo "<table border='1'>
<tr>
<th>UserId</th>
<th>UserName</th>
<th>EncUserName </th>
<th>UserPasswor d</th>
<th>EncUserPass word</th>
<th>UserId</th>
<th>FirstName </th>
<th>UserId</th>
<th>Zip</th>
</tr>";
while ($row = mysql_fetch_arr ay($result))
{
echo "<tr>";
echo "<td>" . $row ['a.user_Id'] . "</td> ";
echo "<td>" . $row ['UEA'] . "</td>";
echo "<td>" . $row ['UEA1'] . "</td>";
echo "<td>" . $row['UEAP'] . "</td>";
echo "<td>" . $row['UEAP1'] . "</td>";
echo "<td>" . $row ['b.user_Id_fk'] . "</td>";
echo "<td>" . $row ['b.Fname'] . "</td>";
echo "<td>" . $row ['c.user_Id_fk'] . "</td>";
echo "<td>" . $row ['c.Zip'] . "</td>";
echo "</tr>";
//echo "<br />";
}
echo "</table>";
mysql_close($co n);[/code]
Comment