where exactly did you get "$db = Connectdb()" from?
To connect to a MySQL database I always use:
$db = mysql_pconnect("servername", "username", "password");
mysql_select_db("database name");
then you can do your select statement.
Youhavent specified a server to connect to, a username, a password, or which database to use, so I would think that might be your problem.