Im trying to make a simple game just to check some things and stuff..
Basicly all the info of a certain thing is on a table just for that
then each player has one/multiple rows depending the thing of course.
The structure is basicly
VARCHAR for Player Name (to indentify the player)
INT for Ammount (the thing ammount)
INT for Thing_ID (the thing id)
but if the player has 2 differents things it creates 2 rows for each one but for only that player!
Now i want to know whats the query to gather all the rows just for that player and display them...
I used:
Code: Select all
$result=mysql_fetch_array(mysql_query("SELECT * from negocios where player='$player'"));
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$variable = mysql_result($result,$i,"variable");
$i++;
This error appears: Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\game\all.bus.php on line 23
line 23 is: $num=mysql_numrows($result);
Thanks for the help