Jump to content

[SOLVED] count($result) help


MikeDXUNL

Recommended Posts

Alright, my database has entries with ID's

 

1, 2, 4

 

 

only those 3 are in the database

 

when I go to try and see if the game is in the DB

 

<?php
$result = mysql_query("SELECT * FROM videogames WHERE gameid = '$gameid'") or die ("Error: ".mysql_error());


$countResult = count($result);
echo $countResult; 
?>

 

if echo's out 1 no matter what the number is (ie. 5, 32, 500)

when those ID's don't exsist.

any help?

Link to comment
https://forums.phpfreaks.com/topic/110776-solved-countresult-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.