payney Posted October 11, 2007 Share Posted October 11, 2007 Hi guys. I have a pretty simple query, but I cant seem to get an output. It works in phpmyadmin but not on the webpage, personally I think my echo is wrong? I am trying to display d.name (division as an alias). $query1 = "select DISTINCT d.name division from division d, division_teams dt WHERE dt.pk = d.pk AND (dt.team LIKE '%%%Leeds%%%');"; while($row = mysql_fetch_assoc($result1)) { echo $division; } Quote Link to comment https://forums.phpfreaks.com/topic/72768-simple-query-problem-i-think/ Share on other sites More sharing options...
Orio Posted October 11, 2007 Share Posted October 11, 2007 echo $row['division']; This should do Orio. Quote Link to comment https://forums.phpfreaks.com/topic/72768-simple-query-problem-i-think/#findComment-366965 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.