Shaz
Member
- Jan 8, 2015
- 57
- 1
im trying to get the specific amount of furniture in the items database, ive done this code
<?php
$query = mysql_query("SELECT COUNT(*) AS id FROM items") or die(mysql_error());
$data = mysql_fetch_assoc($query);
echo $data['id'];
?>
but it tells you the amount of all the furniture but i want to to just select certain id numbers from the items id table
im trying to show how many eg ( Thrones ) are on the hotel for example
There are currently (40) thrones on the hotel
if anybody knows the php code to add correctly it would be helpful thanks.
<?php
$query = mysql_query("SELECT COUNT(*) AS id FROM items") or die(mysql_error());
$data = mysql_fetch_assoc($query);
echo $data['id'];
?>
but it tells you the amount of all the furniture but i want to to just select certain id numbers from the items id table
im trying to show how many eg ( Thrones ) are on the hotel for example
There are currently (40) thrones on the hotel
if anybody knows the php code to add correctly it would be helpful thanks.