[thelist] MySql Select Problem

Jay Blanchard jay.blanchard at niicommunications.com
Wed Apr 10 06:57:01 CDT 2002


[snip]
>$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?
[/snip]

Have you tried running the SELECT statement against the database without
placing it in a the page? That would eliminate a SQL problem right off of
the bat. And from the looks of it you don't have a SQL problem. Can we see
the code where this is output to the page?

Jay





More information about the thelist mailing list