Structure of my table;
VARCHAR username,
VARCHAR user_support_message,
VARCHAR user_support_topic,
VARCHAR admin_support_reply,
VARCHAR request_date,
VARCHAR request_time,
BOOL replied,
I have a table where I keep user's support requests. What I want to do is to get the unanswered support messages from my database (WHERE REPLIED=NO) and represent them in a html page. I'll try to navigate to each entry, one-by-one and edit them, and save them.
I have no problem while getting the records list with a php script. But I don't know how to represent them properly in a HTML page.
Maybe there is a tool like representing data's gathered from databases.
this will list the results
$result = // mysql query response
echo '<table>';
while($data = mysql_fetch_assoc($result)) {
echo '<tr>';
foreach($data as $v) {
echo '<td>'.$v.'</td>';
}
echo '</tr>';
}
echo '</table>';
but you may want to take a look at phpmyadmin if you just want to edit db-entries
you don't need to loop , just use --html option of mysql command :
mysql --html -uroot -e "USE mydb;select * from mytable"