RE: [PHP-DB] php/mysql query
| From: | David Balatero | Date: | Mon, 23 Jul 2001 01:52:34 +0000 |
| Subject: | RE: [PHP-DB] php/mysql query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-10652@lists.php.net to get a copy of this message | ||
Actually, I am kind of confused.. =P ...why wouldn't SELECT * FROM table
WHERE (artist_id = '$id') work?
--
David Balatero
db@icegaming.com
--
-----Original Message-----
From: Matt Nigh [mailto:matt@mattnigh.com]
Sent: Sunday, July 22, 2001 6:30 PM
To: php-db@lists.php.net
Subject: [PHP-DB] php/mysql query
hi. i was wondering if the knowledgeable people on this list could help me
out with a problem i'm having.
what i need is this:
i want a single page that with a variable taken from a database, will
display a different page depending on the name of a band.
http://www.site.com/bands.php?artist=thebandsname
'artist' being the column from the database and 'thebandsname' being a
specific row in the 'artist' column
so basically what i need is some kind of statement sorta like this:
<--- start --->
<?
if(isset($id)) {
$file=$id.".php";
include($file);
}
else {
echo "please specify a band";
}
?>
<--- end --->
but instead of including a file, i wanna include a row from a specific
column, a little like
select * from table where artist = 'thebandsname'
so if anyone could help me with this or point me in the right direction, i'd
be very appreciative. also, if you don't understand what i mean, please feel
to ask and i'll try and explain a little better.
thanks in advance,
Matt Nigh