I want to Count a number of elements in a MySQL Table with the PHP element count, but when i try to give out the result it print 'Resource id #5' which is of course the id for succeeded MYSQL srcipts. If I type it in the SQL console it says I have got Syntax Error (#1064). Thats my code:
<?php
$dbhost = >>hostname<<;
$dbuser = >>user<<;
$dbpass = >>password<<;
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn )
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db(>>database to be selected<<)
or die ("Database couldn´t be found");
echo mysql_query('SELECT COUNT(*) FROM table'); ?>
Which mysql_fetch_ do i have to use?
Thanks for any effords and a happy new year
Tim