Hi all,

I have got this code but I can get it to work, it doesnt make sense!

<snip>
<?php

 $host="localhost";
 $username="user";
 $password="pass";
 $database="admin";

 $mysqlconnect = mysql_connect($host, $username, $password) or die ("Cannot
connect to mySQL server, check it is running");

 mysql_select_db($database, $mysqlconnect) or die ("Cannot connect to the
database, check it is set right");

 $result = mysql_query("SELECT * FROM user");

 $count = mysql_num_rows($result);

 $counted = number_format($count);

 echo $counted;

 ?>
<snip>

but I am getting this error - "Warning: Supplied argument is not a valid
MySQL result resource in /usr/home/e/a/eagadmin/public_html/main.php on line
14" but I dont understand why!

Can anyone help?

Regards, Ian.
---
Randum Ian
DJ / Reviewer / Webmaster, DancePortal (UK) Limited
[EMAIL PROTECTED]
http://www.danceportal.co.uk
DancePortal.co.uk - Global dance music media


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to