Somethings not working out here. I can't figure it out. I can get this statement to work with other tables in my database. Am I missing something easy?
<?php
include 'header.inc';
$result = mysql_query("INSERT INTO tablename (player) VALUES ('4')");
$display = mysql_query("SELECT * FROM tablename");
if($display == 0) // message isn't displayed, though it seems like it should
{
echo "NO values were entered into the database";
}
$rowcheck = mysql_num_rows($display);
echo $rowcheck; //displays '0'
while ($row = mysql_fetch_array($display))
{
echo "<br /> $row[player]";
echo "<br />";
}
?>
'player' is a column in 'tablename'. I've double-checked that. For some reason I'm getting 0 stored in $rowcheck when it should have 1. 'tablename' only has 1 column and it's 'player'. So what the heck is going on here?