Jump to content

rizmah

Members
  • Posts

    54
  • Joined

  • Last visited

rizmah's Achievements

Member

Member (2/5)

0

Reputation

  1. Fixed! Done it thanks for your help anyway!
  2. I changed the code to one while, but now it displayed it on same row but in separate places. <tbody> <tr> <?php $methodssql = $odb -> query("SELECT * FROM `methods`"); while($row = $methodssql ->fetch()) { echo '<td>' . $row['m_title'] . '</td>'; echo '<td>' . $row['sub_date'] . '</td>'; echo '<td>' . $row['author'] . '</td>'; echo '<td>' . $row['tutorial'] . '</td>'; echo '<td> <span class="label label-table label-success"> ' . $row['status'] . ' </span> </td>'; } ?> </tr> </tbody>
  3. <tbody> <tr> <td><?php $methodssql = $odb -> query("SELECT `m_title` FROM `methods`"); while($row = $methodssql ->fetch()) { echo "<tr>" . $row['m_title'] . "</tr>"; } ?></td> <td><?php $methodssql = $odb -> query("SELECT `sub_date` FROM `methods`"); while($row = $methodssql ->fetch()) { echo $row['sub_date']; } ?></td> <td><?php $methodssql = $odb -> query("SELECT `author` FROM `methods`"); while($row = $methodssql ->fetch()) { echo $row['author']; } ?></td> <td><?php $methodssql = $odb -> query("SELECT `tutorial` FROM `methods`"); while($row = $methodssql ->fetch()) { echo $row['tutorial']; } ?></td> <td> <span class="label label-table label-success"><?php $methodssql = $odb -> query("SELECT `status` FROM `methods`"); while($row = $methodssql ->fetch()) { echo $row['status']; } ?></span> </td> </tr> </tbody> Thats the table one. I was thinking of concatenation look at the top one of the code above ( echo "<tr>" . $row['m_title'] . "</tr>"; ). It works but its made it all weird
  4. First off, I am not 100% sure how I would do this that is why I am posting on here. I want to draw each row of database data and put it in a table kind of thing but when I have multiple things in the database it goes in the same row of the table. Instead of it going into the same one I want it to have a different section. Below is an example:
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.