Help please. Database query
Posted: Mon Jan 05, 2004 3:10 pm
This has been bugging me for a while now, I know its something small but I can't find it. Assuming all my tabel names and column names are spelled right, shich I've double checked, does anyone see a reason this wouldn't work
Code: Select all
<?php
$db = mysql_connect("localhost", "username", "pass");
mysql_select_db ("db");
$result = mysql_query("select roster.w_name, master_roster.w_name, master_roster.show, master_roster.active, master_roster.notes
from roster, master_roster
where roster.w_name = master_roster.w_name and roster.status = 1 || roster.status = 3
order by master_roster.w_name", $db) or die(MySQL_Error());
echo "<table border =2><tr><td colspan=4><b><div align=center>Testing</div></b></td></tr>";
while($myrow = mysql_fetch_array($result)){
$name = $myrowї"roster.w_name"];
$show = $myrowї"master_roster.show"];
$active = $myrowї"master_roster.active"];
$notes = $myrowї"master_roster.notes"];
echo "<tr><td width=175>";
echo "$name";
echo "</td><td>";
echo "$show";
echo "</td><td>";
echo "$active";
echo "</td><td>";
echo "$notes";
echo "</td><tr>";
};
echo "</table>"
?>