Test:Test
This is for testing <?php | $con = mysql_connect("localhost","root","Sert1!@#"); |
|
if (!$con) |
{ | die('Could not connect: ' . mysql_error()); | } | |
mysql_select_db("pokedex", $con); |
|
setlocale(LC_ALL, 'ja_JP.UTF-8'); |
|
$result = mysql_query("SELECT * FROM kanto order by number"); |
| |
$i = 0; | $offset = 330; |
|
print "
\n"; print "";|
$sort = $_GET["sort"]; |
|
if ($sort=="1") |
$result = mysql_query("SELECT * FROM kanto order by hex"); | |
else if ($sort=="2") |
$result = Mysql_query("SELECT * FROM kanto order by engName"); | | |
while($row = mysql_fetch_array($result)) |
{ | $get = $i + 1; | | if ($i % 9 == 0 && $i != 0) | { |print "
Pokédex Number | Hex Value | Sprite | Name |
"; |
| if ($offset % 660 == 0 && $offset != 0) | { |
print "
\n"; $offset = 0; | } | | else | { | print "} | |print "\n"; | | print ""; |
|print ""; |
|print " ";
|print "\n";
|print "\n"; | | | /* echo $row['number'] . " " . $row['engName']; | echo "
"; | */ | $i++; | } | | print "
Pokédex Number | Hex Value | Sprite | Name |
".$row['number'] ." | " . $row['hex'] . " | <img src=\"pics/" . $row['engName'] . ".png\" height=50 width=50 /> | <a href=\"getPokemonSQL.php?zukan=" . $row['number'] . "\" >" . $row['engName'] . "</a> |
\n"; |
|
mysql_close($con); | ?>