Skip to content
woosoo2 edited this page Mar 6, 2014 · 12 revisions

상의에 대한 상세보기만 가능 ->하의도 되게해야됨 (테이블명, bid,bname)적용

<?php
//print $_GET["tId"];
$con=mysql_connect("localhost","tv11","imtv11");
$sql = "select * from top where tid=".$_GET["tId"].""; // ".$_GET["tId"]."";
// 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["detailTop"]=array();
	$resultArray["detailTop"]["tid"]=$row["tid"];
	$resultArray["detailTop"]["tname"]=$row["tname"];
	$resultArray["detailTop"]["sex"]=$row["sex"];
	$resultArray["detailTop"]["tmn"]=$row["tmn"];
	$resultArray["detailTop"]["tmx"]=$row["tmx"];
	$resultArray["detailTop"]["style"]=$row["style"];
	$resultArray["detailTop"]["price"]=$row["price"];
	$resultArray["detailTop"]["size"]=$row["size"];
	$resultArray["detailTop"]["url_1"]=$row["url_1"];
	$resultArray["detailTop"]["url_2"]=$row["url_2"];
}
echo "". json_encode($resultArray,JSON_UNESCAPED_UNICODE) . "";
mysql_close($con);
?>```

Clone this wiki locally