Jump to content

lordtrini

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lordtrini's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am trying to display the results of a query in the form of a table. this it the PHP that i am using below. The problem is that the headings of the table repeats. I really don't want that... I am also trying to get a border around the cells of the table, but i get an error when i add table properties Can someone help me please. <?php if ( isset( $_GET['id'] ) ) { $query = "SELECT * FROM schedule WHERE course_id = '". $_GET['id'] ."' ORDER BY indexx ASC"; $numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); if ($numrows == 0) { echo "This course does not have a set schedule. "; } $q .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query"); while ($row= mysql_fetch_array($result)) { $indexx = $row["indexx"]; $semester = $row["semester"]; $day = $row["day"]; $time = $row["time"]; $instructor = $row["instructor"]; $location = $row["location"]; echo "<table>"; echo "<tr>"; echo " <td>Index</td>"; echo "<td>Semester</td>"; echo "<td>Day</td>"; echo "<td>Time</td>"; echo "<td>Instructor</td>"; echo "<td>Location</td>"; echo "</tr>"; echo "<tr>"; echo "<td>$indexx</td>"; echo "<td> $semester</td>"; echo "<td>$day</td>"; echo "<td>$time</td>"; echo "<td>$instructor</td>"; echo "<td>$location</td>"; echo "</tr>"; echo"</table>"; $count++ ; } // end WHILE echo "<br/>End test link<br/>"; } // end IF ?>
  2. id course_id major_code semester 1 PRE 100 1 1 2 ACCT 201 1 1 3 BUAD 100 1 1 4 ENG 101 1 1 5 HLF 1 1 6 MAT 125 1 1 11 BUAD 112 1 2 10 ACCT 202 1 2 12 MGMT 180 1 2 13 MAT 107 1 2 14 SP 101 1 2 15 ACCT 230 1 3 16 ACCT 235 1 3 17 ECO 201 1 3 I have a the following data in a MySQL DB... I what to have all the semester 1 courses grouped together but with a horizontal ruler between each semester.... can this be done...
  3. is there a way to put a separator between groups of database results php/mysql when i use the GROUP BY method of sorting.
×
×
  • 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.