I am trying to access a group of tables from one main listing table.
this is my attempt.
<?php
$db = mysql_connect(localhost, root);
mysql_select_db(\"ngl\",$db);
$result = mysql_query(\"SELECT * FROM Tournaments ORDER BY Name\",$db);
while ($myrow = mysql_fetch_row($result))
{
$result = mysql_query(\"SELECT * FROM $myrow[0] ORDER BY Name\",$db);
while ($myrow2 = mysql_fetch_row($result))
{
print \"$myrow2[0]<BR>\";
print \"$myrow2[1]<BR>\";
print \"$myrow2[2]<BR>\";
}
}
php?>
i am really new to this so i have no idea what im doing wrong but i know its in the line.
$result = mysql_query(\"SELECT * FROM $myrow[0] ORDER BY Name\",$db);
this is my attempt.
<?php
$db = mysql_connect(localhost, root);
mysql_select_db(\"ngl\",$db);
$result = mysql_query(\"SELECT * FROM Tournaments ORDER BY Name\",$db);
while ($myrow = mysql_fetch_row($result))
{
$result = mysql_query(\"SELECT * FROM $myrow[0] ORDER BY Name\",$db);
while ($myrow2 = mysql_fetch_row($result))
{
print \"$myrow2[0]<BR>\";
print \"$myrow2[1]<BR>\";
print \"$myrow2[2]<BR>\";
}
}
php?>
i am really new to this so i have no idea what im doing wrong but i know its in the line.
$result = mysql_query(\"SELECT * FROM $myrow[0] ORDER BY Name\",$db);