Skip to content

Instantly share code, notes, and snippets.

@kentakang
Created July 19, 2018 06:02
Show Gist options
  • Save kentakang/00c457e6ba5a00ae14bca18cde040322 to your computer and use it in GitHub Desktop.
Save kentakang/00c457e6ba5a00ae14bca18cde040322 to your computer and use it in GitHub Desktop.
<table border=1>
<tr>
<td>1위</td>
<td>2위</td>
<td>3위</td>
<td>4위</td>
<td>5위</td>
<td>6위</td>
<td>7위</td>
<td>8위</td>
<td>9위</td>
<td>10위</td>
<td>시간</td>
</tr>
<tr>
<?php
$conn = mysql_connect('localhost', 'root', 'wmJQu7qrxqtZ');
$db_status = mysql_select_db('ranking');
$query = "select * from search order by date desc";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result)) {
print "<tr>";
print "<td>".$row['first']."</td>";
print "<td>".$row['second']."</td>";
print "<td>".$row['third']."</td>";
print "<td>".$row['fourth']."</td>";
print "<td>".$row['fifth']."</td>";
print "<td>".$row['sixth']."</td>";
print "<td>".$row['seventh']."</td>";
print "<td>".$row['eighth']."</td>";
print "<td>".$row['ninth']."</td>";
print "<td>".$row['tenth']."</td>";
print "<td>".$row['date']."</td>";
print "</tr>";
}
?>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment