13 lines
404 B
PHP
13 lines
404 B
PHP
<?php
|
|
$id=0;
|
|
if(!is_null($_GET["id"]) and is_numeric($_GET["id"])){
|
|
$id=$_GET["id"];
|
|
}
|
|
$msql=new mysqli('localhost','web','','web');
|
|
if($msql->connect_errno){
|
|
die("connection error: ".$msql->connect_error);
|
|
}
|
|
$string="SELECT id,file,title,hover FROM comics ORDER BY CASE WHEN (id='$id') THEN 0 ELSE 1 END, id DESC";
|
|
$qry=$msql->query($string) or die($msql->error);
|
|
$comic=$qry->fetch_assoc();
|
|
?>
|