sir pannels
01-08-2003, 01:05 PM
hmm wel topic says it all .. also it says...
Warning: Supplied argument is not a valid MySQL-Link resource in c:\phpdev\www\public\game\viewfleet2.php on line 7
heres the code.. could anyone find why its not workin? or give me some ideas.
thanks.
<?
$dbc = mysql_connect('localhost', '', '') or die("Couldn't connect to database");
mysql_select_db('GAME') or die("Couldn't select database");
$query = "SELECT * FROM fleet WHERE id=$id";
$rs=mysql_query($query,$conn)
or die("Could not execute query");
echo ("<table align='center' border=\"1\" cellpadding=\"2\" bordercolor=\"#0080C0\">");
echo ("<tr>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Vessel Name</font></th>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Description</font></th>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Cost</font></th>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Your Count</font></th>");
echo ("</tr>");
while($row= mysql_fetch_array($rs) )
{
$list .= "<tr>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vesselname"]."</small></font></td>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vesseldescription"]."</small></font></td>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vcost"]."</small></font></td>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vcount"]."</small></font></td>";
$list .= "</tr>";
}
$list .= "</table>";
echo($list);
?>
cheers
P:thumbsup:
Warning: Supplied argument is not a valid MySQL-Link resource in c:\phpdev\www\public\game\viewfleet2.php on line 7
heres the code.. could anyone find why its not workin? or give me some ideas.
thanks.
<?
$dbc = mysql_connect('localhost', '', '') or die("Couldn't connect to database");
mysql_select_db('GAME') or die("Couldn't select database");
$query = "SELECT * FROM fleet WHERE id=$id";
$rs=mysql_query($query,$conn)
or die("Could not execute query");
echo ("<table align='center' border=\"1\" cellpadding=\"2\" bordercolor=\"#0080C0\">");
echo ("<tr>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Vessel Name</font></th>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Description</font></th>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Cost</font></th>");
echo ("<th bgcolor=\"#FFFFFF\"><font face=\"Terminal\" color=\"#FF0000\">Your Count</font></th>");
echo ("</tr>");
while($row= mysql_fetch_array($rs) )
{
$list .= "<tr>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vesselname"]."</small></font></td>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vesseldescription"]."</small></font></td>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vcost"]."</small></font></td>";
$list .= "<td align=\"center\"><font face=\"Verdana\"><small>".$row["vcount"]."</small></font></td>";
$list .= "</tr>";
}
$list .= "</table>";
echo($list);
?>
cheers
P:thumbsup: