SkyRanger Posted March 26, 2012 Share Posted March 26, 2012 Not sure what the problem is but when I extract the data only 1 column per row is showing: $resultc = mysql_query("SELECT t1.title, t2 . * FROM post AS t1 JOIN comment AS t2 ON t2.mpid = t1.mpid WHERE t1.mpid = '$mpid' and t2.review = '1'"); if (mysql_num_rows($resultc)) { while($rowc = mysql_fetch_array($resultc)) echo "re:" . $rowc['title']; echo $rowc['vpcomm']; } else { echo "No Comments Available"; } The only thing that shows is the ['title'] vpcomm does not show. And yes vpcomm has an entry. Can anybody notice a problem? Quote Link to comment https://forums.phpfreaks.com/topic/259753-extracing-data/ Share on other sites More sharing options...
smerny Posted March 26, 2012 Share Posted March 26, 2012 put brackets around the code block in your while loop, it will only execute the first line if you dont Quote Link to comment https://forums.phpfreaks.com/topic/259753-extracing-data/#findComment-1331298 Share on other sites More sharing options...
SkyRanger Posted March 26, 2012 Author Share Posted March 26, 2012 Crap, thanks smerny i never even noticed that. Nice to have a second set of eyes looking at it. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/259753-extracing-data/#findComment-1331300 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.