[thelist] MySql Select Problem

Jay Blanchard jay.blanchard at niicommunications.com
Wed Apr 10 07:44:00 CDT 2002


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

   venuename ='[$venueName]'";

There's something about double-quotes that threw me
last week with something else.  This [] syntax (which
I may have just done wrongly) seems to do the trick.
{/snip]

*slapping hand to forehead* If he is using PHP he shouldn't even need to use
brackets i.e.

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

But his query seems to be working correctly, and his concatenation syntax
'".$venueName."' is OK (I just tried it both ways). He is just getting an
unusual return on his page. That's why I think the code in the page to
display the results is at fault, but until we see that...

Jay





More information about the thelist mailing list