Hey All,

I am having problems working on a script and need some advise. Here's my
problem. I have two tables with teh following variables:

rahs table:
name, number, team, position

stats table:
name, team, penalty, groundballs, shots, faceoffs_won, faceoffs_lost, date

and I need to make it so using a pulldown menu I can select player stats by
their position but since the position variable isnt in both tables is it
possbile to do a select command using a variable from one table for another
table?

Here's my syntax, but i dont know if it works:

$groundballsquery = mysql_query("SELECT SUM(groundballs) AS grouders FROM
stats WHERE (position = '$position') FROM rahs");

is it possible to do a WHERE command with a FROM command?

Thanks!
--------------------------------------------
-Alex "Big Al" Behrens
E-mail: [EMAIL PROTECTED]
Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
Phone: 651-482-8779
Cell: 651-329-4187
Fax: 651-482-1391
ICQ: 3969599
Owner of the 3D-Unlimited Network:
http://www.3d-unlimited.com
Send News:
[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to