mysql_fetch_array()
Posted: Sun May 08, 2011 12:07 pm
Hey guys I have been getting the : Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource error message but I can't really find a problem in the code..
Any help would be appreciated, thank you
Edit:
Nvm stupid mistake i forgot to add `` arround the table name
Code: Select all
$sqlC="SELECT * FROM $FileName";
$resultC=mysql_query($sqlC);
while($rows=mysql_fetch_array($resultC)){
?>
<table>
<tr>
<td><?php echo "$rows[Username]"; ?></td>
<td><?php echo "$rows[DateTime]"; ?></td>
</tr>
<tr>
<td><?php echo "$rows[Comment]"; ?></td>
</tr>
</table>
<?php
}
mysql_close(); //close database
?>Edit:
Nvm stupid mistake i forgot to add `` arround the table name