[thelist] MySql Select Problem

Bill Bejeck bethbejeck at earthlink.net
Tue Apr 9 18:25:01 CDT 2002


I am having trouble using Select with one of my queries.  The code below is
what I am using to find sports at a particular venue.  I am using PHP with
MySQL.

$query="SELECT sportName,sportCaptain,captainPhone FROM sports WHERE
venueName ='".$venueName."'";

The primary key in the sports table is sportName and venueName is a foreign
key.  My problem is this: when the results of the query are printed out I
get the correct number of sports per venue, but the first name is repeated.
For example, the venue DC Convention Center has Badminton,Triathlon,Swimming
and Soccer for sports but Badminton  gets printed out 4 times.  Any ideas
what this could be?

Thanks,
Bill




More information about the thelist mailing list