Skip to content
woosoo2 edited this page Mar 7, 2014 · 12 revisions
<?php
//print $_GET["tId"];
if($_GET["tId"] != NULL){
$sql = "select * from top where tid=".$_GET["tId"].""; // ".$_GET["tId"]."";

}else{
$sql = "select * from bot where bid=".$_GET["bId"].""; // ".$_GET["tId"]."";

}
$con=mysql_connect("localhost","tv11","imtv11");
// Check connection
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db("tv11", $con);
$result = mysql_query($sql);
$resultArray = array();
if($row = mysql_fetch_array($result)){
	$resultArray["detail"]=array();
	$resultArray["detail"]["tid"]=$row["tid"];
	$resultArray["detail"]["bid"]=$row["bid"];
	$resultArray["detail"]["tname"]=$row["tname"];
	$resultArray["detail"]["bname"]=$row["bname"];
	$resultArray["detail"]["sex"]=$row["sex"];
	$resultArray["detail"]["tmn"]=$row["tmn"];
	$resultArray["detail"]["tmx"]=$row["tmx"];
	$resultArray["detail"]["style"]=$row["style"];
	$resultArray["detail"]["price"]=$row["price"];
	$resultArray["detail"]["size"]=$row["size"];
	$resultArray["detail"]["url_1"]=$row["url_1"];
	$resultArray["detail"]["url_2"]=$row["url_2"];
}
echo "". json_encode($resultArray,JSON_UNESCAPED_UNICODE) . "";
mysql_close($con);

?>

Clone this wiki locally