It's most likely not a version issue. Most likely:
1. Your script has not connected to the database in order to run the query
or
2. Your script connects to the database but there are no records (no data) that matches the query. In other words, you got an "empty" result set.
To test #1, run the following code BEFORE any other code in your PHP script. If it's working okay, it should display "resource #14" or something like that.
# Purpose: Establish a connection to the database
#
$dbname = 'your_database_name_here';
$dbhost = 'localhost';
$dbusername = 'your_username_here';
$dbpassword = 'your_password_here';
#
$dbconnection = @mysql_connect($dbhost, $dbusername, $dbpassword);
if ($dbname != '' && !@mysql_select_db($dbname)) {
echo 'I could NOT connect to the database! Check the username, password, etc.';
} else {
echo 'I connected. The connection is: ' . $dbconnection;
}
To test #2, enter your query directly into phpMyAdmin and see what it tells you. It will say "0 records returned" or it will give you an error message. 0 records means the query was acceptable but no data matched your search. If you get an error, it means your query is broken and ya gots some fixin' to do!
Does that help? (If yes, please click my reputation checkmark
