Hi there folks, I have a small prob regarding SQL on MySQL 3.22.32 
using php4.0.3pl1 :

I want to select DISTINCT sports from one table WHERE a username and a 
password match a username and a password in another table - not sure 
how to construct my query.

In an ideal world it's gonna look something like this:

$sql = "SELECT DISTINCT sportID FROM $table_sport"; 
$sql .= "SELECT * FROM $table_users WHERE $table_users.usrName='$admin_username' 
AND $table_users.usrPswd=password('$admin_password')";

Just not sure how the query needs to be constructed...
Can anyone with even slightly advanced (over me) SQL knowledge help me 

Many thanks!

         "Believe nothing - consider everything"        
           "Web Developers do it on-the-fly."
  Russ Michell
  Anglia Polytechnic University Webteam
  +44 (0)1223 363271 ext 2331

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to