GetDotted Domains

Viewing Thread:
"PHP & MySQL : The Revenge"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Mon 26/01/04 at 18:04
Regular
"previously phuzzy."
Posts: 3,487
Righty ho folks, got another task for ye.

I want to call up, from a MySQL database, a list of games which have information in a certain field, and a URL for each from a database. For example

$gameName

However, a) I'm not sure of the MySQL query to use to get every game name and preview link when there's a preview URL there (the names and URL's should be extracted from the database only when theres a URL in the gamePreviewURL field) and also how to add the extra condition of a format from an 'ENUM' list (ie WHERE gameFormat = "Gamecube") and have it all working in harmony.

Secondly, b) when I have it all from the base, what would be the best way to extract and display the information.

Any help is greatly appreciated.

ph
Fri 30/01/04 at 22:42
Regular
"previously phuzzy."
Posts: 3,487
I've tried both, and you can see the results at :

http://www.synae.com/query.php and
http://www.synae.com/query2.php.

Darn it :D

Any ideas on how to fix?
Tue 27/01/04 at 17:34
Regular
"Chavez, just hush.."
Posts: 11,080


$result = mysql_query( "SELECT * FROM table ORDER BY name ASC;" )

or die("SELECT Error: ".mysql_error());

# Loop through each row of data.

print "\n";

print "\n";

print "\n";

while ($a_row = mysql_fetch_array($result)){

print "\n";

print "\n";



print "\n";
}

print "
\n";
print "NAME\n";
print "
\n";

if ($a_row[target] == '') {
print "-";
}
else
print " $a_row[name]\n";
{

print "
\n";

mysql_close($db);

?>

Not sure if it will work. It's probably wrong, but it will do...
Mon 26/01/04 at 23:01
Regular
"Eff, you see, kay?"
Posts: 14,156
$query = mysql_query("select * from games where gamePreviewURL and gameFormat = 'GameCube'");
while ($info = mysql_get_object($query)) {

echo "gamePreviewURL\"> $info->gameName ";

}

(Extra spaces because SR can't deal with magic_quotes_gpc)
Mon 26/01/04 at 22:17
Regular
"Chavez, just hush.."
Posts: 11,080
I think I know what you're on about. You could probably do it with an if statement.

I'll have a quick go and post something tomorrow.
Mon 26/01/04 at 18:04
Regular
"previously phuzzy."
Posts: 3,487
Righty ho folks, got another task for ye.

I want to call up, from a MySQL database, a list of games which have information in a certain field, and a URL for each from a database. For example

$gameName

However, a) I'm not sure of the MySQL query to use to get every game name and preview link when there's a preview URL there (the names and URL's should be extracted from the database only when theres a URL in the gamePreviewURL field) and also how to add the extra condition of a format from an 'ENUM' list (ie WHERE gameFormat = "Gamecube") and have it all working in harmony.

Secondly, b) when I have it all from the base, what would be the best way to extract and display the information.

Any help is greatly appreciated.

ph

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Thank you very much for your help!
Top service for free - excellent - thank you very much for your help.
My website looks tremendous!
Fantastic site, easy to follow, simple guides... impressed with whole package. My website looks tremendous. You don't need to be a rocket scientist to set this up, Freeola helps you step-by-step.
Susan

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.