I have tried that a bunch of times and I get:
Warning: Supplied argument is not a valid MySQL result resource in /my_dir/my_file
I have checked my database connection and table name and all is good. That is why I posted, it does seem to work?
here is my code:
$host = "my_host";
$db_user = "my_user";
$db_pass = "my_pass";
$db_used = "My_db";
$connection = @mysql_connect("$host","$db_user","$db_pass")
or die ("could not connect.");
$db = @mysql_select_db($db_used, $connection)
or die ("could not connect.");
//-----------------------------------------------------
$result=MYSQL_QUERY("select * from random_facts order by rand() limit 1 ");
$row=MYSQL_FETCH_ARRAY($result);
print( "$result[0]");
mysql_close($connection);
I know the rule of checking the board and the manual first, but it seems to me like I am doing it right.. sorry, like I said.. I am kinda new at this..
and THANK YOU for your reply! 🙂