coder9 Posted July 19, 2008 Share Posted July 19, 2008 yo! How to determine which column name are not blank? in a record? and display the not empty column name? let say i have this table below. box1|box2|box3|box4|box5|box6|box7|box8|box9| ------------------------------------------------- ok | | | ok | | ok | | | ok | using loop thank you. Quote Link to comment Share on other sites More sharing options...
coder9 Posted July 19, 2008 Author Share Posted July 19, 2008 sorry the alignment column of the table is not well aligned. Quote Link to comment Share on other sites More sharing options...
coder9 Posted July 19, 2008 Author Share Posted July 19, 2008 bump Quote Link to comment Share on other sites More sharing options...
coder9 Posted July 19, 2008 Author Share Posted July 19, 2008 i tried this one function check_selected_box() { //access all field name $query = "SELECT * FROM jtablegrid WHERE game_no = 1"; $result = mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); $row = mysql_fetch_row($result); $i=0; while($i <=100) { if($row[$i] != '') { echo "user" . $row[$i]; echo "<br>"; } } } but it display a blank page. i dunno what's causing the blank display? is that function that i created almost got the necessary logic. All i want really is to get all the not empty column names and display there column names. thanks in advance if someone will help me with this. sorry i can't edit my first post for this because there is no button to edit my first post that is why i can't fix the wrong words there. any help please. Quote Link to comment 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.