Here is the query:
$result = mysql_query( "SELECT t.FirstName, t.LastName, g.GymName, t.City, t.State
FROM target t
INNER JOIN targetarea tg ON t.targetID=tg.t开发者_开发百科argetID
WHERE t.targetID='$id'" );
echo $result;
Only problem is, nothing gets printed therefore i have a mysql syntax error, so what am i doing wrong?
You have g.GymName
in the SELECT
list but the table alias is tg
not g
(may be other issues as well I'm not a php
-er but that one jumped out at me).
精彩评论