twilitegxa Posted September 22, 2008 Author Share Posted September 22, 2008 That didn't work either. I took the defects out of the table and just ran it all together and placed what looked like an outline for a table with nothing in it at the top of the page. Quote Link to comment https://forums.phpfreaks.com/topic/125218-solved-query-only-returning-one-result/page/2/#findComment-647352 Share on other sites More sharing options...
Minase Posted September 22, 2008 Share Posted September 22, 2008 IE is a bastard im 100% sure that in firefox no problem apear... but still its weird that it apear like that in IE Quote Link to comment https://forums.phpfreaks.com/topic/125218-solved-query-only-returning-one-result/page/2/#findComment-647354 Share on other sites More sharing options...
twilitegxa Posted September 22, 2008 Author Share Posted September 22, 2008 I will check in FF. Quote Link to comment https://forums.phpfreaks.com/topic/125218-solved-query-only-returning-one-result/page/2/#findComment-647364 Share on other sites More sharing options...
twilitegxa Posted September 22, 2008 Author Share Posted September 22, 2008 In FF it just doesn't display in a table and the Character Defects part is still repeating as well. Quote Link to comment https://forums.phpfreaks.com/topic/125218-solved-query-only-returning-one-result/page/2/#findComment-647365 Share on other sites More sharing options...
twilitegxa Posted September 22, 2008 Author Share Posted September 22, 2008 I changed it to this code, and now it works perfectly: //validate defects $get_defects = "SELECT * FROM character_defects INNER JOIN scout USING (identity) WHERE scout.id = $_GET[id] ORDER BY defect_id ASC"; $get_defects_res = mysql_query($get_defects) or die (mysql_error()); if (mysql_num_rows($get_defects_res) < 1) { //invalid table $display_block .= "<p><em>Invalid table selection.</em></p>"; } else { //valid table, get info //That's where we start table $display_block .= " <table cellpadding=3 cellspacing=3 border='0' width='40%' id='stats'> <tr> <tr><td colspan='3' id='th'>Character Defects</td></tr> "; while($row = mysql_fetch_array($get_defects_res)) { //here we start the loop $defect_id = stripslashes($row['defect_id']); $desc = $row['desc']; $bp = stripslashes($row['bp']); //display defects $display_block .= "<tr> <td>$defect_id $desc</td> <td>$bp BP</td></tr>"; } //here the loop ends $display_block .="</table>"; //here the table ends } Quote Link to comment https://forums.phpfreaks.com/topic/125218-solved-query-only-returning-one-result/page/2/#findComment-648113 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.