Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ขออนุญาตสอบถาม โค้ดค้นหาข้อมูลแบบ list/menu ค้า ^^



 

ขออนุญาตสอบถาม โค้ดค้นหาข้อมูลแบบ list/menu ค้า ^^

 



Topic : 103479

Guest




5



คือเลือกแบบนี้เลยค่ะ พอเขียนโค้ดแล้วมันติดอ่ะค่ะ รบกวนดูให้หน่อยว่าติดตรงไหน


Code (PHP)
   <?php
$map_year  =$_POST["cmb_year"];
$map_datatype =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//echo $map_year;
//echo $map_filetype;
//echo $map_coordinate;
//exit;
?>

<meta http-equiv="Content-Type" content="text/html;charset=tis-620" />
<style type="text/css">
<!--
body {
	background-color: #F7F7D8;
}
.style2 {
	font-size: 16px;
	color: #3300FF;
}
.style6 {
	color: #CC00FF;
	font-weight: bold;
}
.style7 {color: #F802E4}
-->
</style>
          <tr>
        <td><div align="center">
            <p class="style64 style2 style6 style7">แผนที่ Basemap เหมืองแม่เมาะ </p>
          </div>
          <FORM METHOD=POST ACTION="basemapMMview.php">
         <h4><font color=#330000>
     
   <?php



$date_=$year_.$month_;
include("inc\adodb.inc.php");
include("inc\conn.php");
//$objConnect = mysql_connect("localhost","mineplan","kp302873","mineplan") or die("Error Connect to Database");     
$objDB = mysql_select_db("basemap_mm"); 
$strSQL="set names tis620";
$objQuery = mysql_query($strSQL);   
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
//$strSQL = "select * from  basemap_mm  where id like '$date_%' order by id desc";    

$map_year  =$_POST["cmb_year"];
$map_datatype =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//-------------------------------------------------------------
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"
	{//=====Year Only ==================================================================(2_พ.ศ)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"	{//=====datatype Only ==================================================================(3_ข้อมูล)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		$strSQL =$strSQL." Where datatype ='$map_datatype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{//=====Sys_CoOr Only ==================================================================(4_พิกัด)

		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";   
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
//-------------------------------------------------------------
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//=====type Only ==================================================================(5_ไฟล์)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		$strSQL =$strSQL." Where type ='$map_filetype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
//==================================================================(6_พ.ศ/ข้อมูล)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year' and  ";
		$strSQL =$strSQL." Where datatype ='$map_datatype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	//============================================================
		//========(7_พ.ศ/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL."where  type ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";	
	}
//---------------------------------------------------------	
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{


	//==============================================================================
	
	//========(8_พ.ศ/ไฟล์)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." type ='$map_filetype'  ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{

//========(9_ข้อมูล/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." datatype ='$map_datatype' and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{

//============================================================/

//========(10_ข้อมูล/ไฟล์)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." datatype ='$map_datatype' and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type ='$map_filetype'  ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
//======================================================


//========(11_ไฟล์/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL."where  type ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
//==============================================================================


//------------------------------------------------------------------//



	
	//===========(12_พ.ศ/ข้อมูล/พิกัด)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================
	
		//===========(13_พ.ศ/ข้อมูล/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type  ='$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================

	//===========(14_ข้อมูล/พิกัด/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type  ='$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================
	
	
	//======Year and TypeFile  and System CoOr ===========(15_พ.ศ/พิกัด/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." type  ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================
	
	
	//======Year and TypeFile  and System CoOr ==================================================
			$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";   
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL." type  ='$map_filetype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}


//======Year and TypeFile ==============================================================

  
//$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
?> 
 <table width="1300" border="3"align="center"cellpadding="1" cellspacing="1" bordercolor="330033" bgcolor="#FF9999">
<tr bgcolor=#FFFFCC>
<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000><b>ลำดับที่</b></div></td> 

<td width="500" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>คำอธิบายประกอบ</div></td> 

<td width="250" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ประเภทข้อมูล</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ระบบพิกัด</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>TypeFile</div></td>

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ขนาดไฟล์</div></td> 

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>อัพโหลดเมื่อ</div></td>

</tr> 


<? 
$result=mysql_query($strSQL); 
if($result)
	{		while($objResult = mysql_fetch_array($result)) //objQuery
				{  
						?> 
						<tr> 
<TR bgcolor=#FFE4E1>
<td><div align="center"><b>
  <?=$objResult["id"];?>
</b></div></td>


<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["comment"];?>
</div></td>


<td><div align="center">
  <?=$objResult["datatype"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["sys_coor"];?>
</div></td>

<td><div align="center">
  <?=$objResult["type"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["size"];?>
</div></td>
<td bgcolor=#EED5D2><div align="center">
  <div align="center">
    <?=$objResult["upload"];?>
  </div>
						<?php 			
						//echo"1111";
						echo $objResult["DateUpload"];?>
						</div></td>
	  </tr> 
						<?   
				} 
?> 
</table> 
<? }else {echo "Nodata";}
mysql_close; 
?> 
     </form>
  </table>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>





อีกอันค่ะ
   <?php
$map_year  =$_POST["cmb_year"];
$map_datatype =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//echo $map_year;
//echo $map_filetype;
//echo $map_coordinate;
//exit;
?>

<meta http-equiv="Content-Type" content="text/html;charset=tis-620" />
<style type="text/css">
<!--
body {
	background-color: #F7F7D8;
}
.style2 {
	font-size: 16px;
	color: #3300FF;
}
.style6 {
	color: #CC00FF;
	font-weight: bold;
}
.style7 {color: #F802E4}
.style10 {
	font-size: xx-large;
	color: #006666;
}

-->
</style>





          <tr>
        <td><div align="center">
            <p align="center" class="style64 style2 style6 style7"><span class="style10">ค้นหา แผนที่ Basemap เหมืองแม่เมาะ</span></p>
          </div>
          <FORM METHOD=POST ACTION="BasemapMMview.php">
         <h4><font color=#330000>
          </form>
		  
		  
		  
   <?php



$date_=$year_.$month_;
include("inc\adodb.inc.php");
include("inc\conn.php");
//$objConnect = mysql_connect("localhost","mineplan","kp302873","mineplan") or die("Error Connect to Database");     
$objDB = mysql_select_db("basemap"); 
$strSQL="set names tis620";

$strSQL = "select * from  basemap_mm where id like '$date_%' order by id desc";    

$objQuery = mysql_query($strSQL);   
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
//$strSQL = "select * from  basemap_mm  where id like '$date_%' order by id desc";    

$map_year  =$_POST["cmb_year"];
$map_datatype  =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//-------------------------------------------------------------
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//=====Year Only ==================================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//=====type Only ==================================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		$strSQL =$strSQL." Where datatype ='$map_datatype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//=====Sys_CoOr Only ==================================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//=====Sys_CoOr Only ==================================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		$strSQL =$strSQL." Where type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
	
	
	
	
	////แมทกัน///
	
	
	
	
	
	
	
//-------------------------------------------------------------
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size ,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype ='$map_datatype'  ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size ,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL."where  datatype ='$map_datafiletype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL."where  type ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";	
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
	$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' and";
		$strSQL =$strSQL." type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
	
	if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
	$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' and";
		$strSQL =$strSQL." type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
	
	if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
	$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' and";
		$strSQL =$strSQL." type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
	
	if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
	$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' and";
		//$strSQL =$strSQL." type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
	
	if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
	$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' and";
		$strSQL =$strSQL." type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
	
	if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{//==============================================================================
	$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' and";
		$strSQL =$strSQL." type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
	
//---------------------------------------------------------	
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{
		
	//หมดเลย//
	//======Year and TypeFile  and System CoOr ==================================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload  ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' and";
		$strSQL =$strSQL." type = '$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype =="---เลือกประเภทข้อมูล----"  and $map_coordinate =="---เลือกระบบพิกัด----"  and $map_filetype =="---เลือกประเภทไฟล์----" ) 
	{
	//ไม่เลือกเลย//
	//======Year and TypeFile  and System CoOr ==================================================
		$strSQL = "select  id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,type,size,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL." type  ='$map_filetype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}


//======Year and TypeFile ==============================================================

  
//$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
?> 


 <table width="1300" border="3"align="center"cellpadding="1" cellspacing="1" bordercolor="330033" bgcolor="#FF9999">
<tr bgcolor=#FFFFCC>
<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000><b>ลำดับที่</b></div></td> 

<td width="500" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>คำอธิบายประกอบ</div></td> 

<td width="250" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ประเภทข้อมูล</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ระบบพิกัด</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>TypeFile</div></td>

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ขนาดไฟล์</div></td> 

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>อัพโหลดเมื่อ</div></td>

</tr> 


<? 
$result=mysql_query($strSQL); 
if($result)
	{		while($objResult = mysql_fetch_array($result)) //objQuery
				{  
						?> 
						<tr> 
<TR bgcolor=#FFE4E1>
<td><div align="center"><b>
  <?=$objResult["id"];?>
</b></div></td>


<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["comment"];?>
</div></td>


<td><div align="center">
  <?=$objResult["datatype"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["sys_coor"];?>
</div></td>

<td><div align="center">
  <?=$objResult["type"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["size"];?>
</div></td>
<td bgcolor=#EED5D2><div align="center">
  <div align="center">
    <?=$objResult["upload"];?>
  </div>
						<?php 			
						//echo"1111";
						echo $objResult["DateUpload"];?>
						</div></td>
	  </tr> 
						<?   
				} 
?> 
</table> 
<? }else {echo "Nodata";}
mysql_close; 
?> 
  </table>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>





Tag : PHP, MySQL, HTML/CSS, JavaScript







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2013-12-11 10:57:37 By : กุนกุน View : 758 Reply : 10
 

 

No. 1

Guest


Code (PHP)
<html>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">

<?php


include("inc\adodb.inc.php");
include("inc\conn.php");

		$sql="select * from tyear";
		//$sql="select * from typefile";
		$result = $db->Execute($sql);
		
			
?>
	
		<style type="text/css">
<!--
.style1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 24px;
	color: #0000FF;
	font-weight: bold;
}
body {
	background-color: #D5F5F5;
}
.style3 {font-family: Arial, Helvetica, sans-serif; font-size: 20px; color: #0000FF; font-weight: bold; }
.style6 {font-size: 20px; color: #1C0CF6; font-family: Arial, Helvetica, sans-serif;}
-->
        </style>
	
<Form name="form1" target="LowFrame"  METHOD=POST action="basemapMMviewSelect.php">	

		
				<p align="center" class="style1"><span class="style3"><span class="style6">  Website ข้อมูลแผนที่ Basemap  เหมืองแม่เมาะ </span></span></p>
<p align="center" class="style1">
			 
				 <select Name="cmb_year">
					<option>---เลือกปี พ.ศ.----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['cyear']."</option>";
							$result->MoveNext();
							}
						?>
				 </select> 
				 
				 
				 			   <?PHP
		   $sql="select datatype from basemap_mm group by datatype ";
				$result = $db->Execute($sql);

		?>		 
				   <select Name="cmb_datatype">
					<option>---เลือกประเภทข้อมูล----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['datatype']."</option>";
							$result->MoveNext();
							}
						?>
				   </select>	
				   
		
				   
		<?PHP
		   $sql="select sys_coor from basemap_mm group by sys_coor  ";
				$result = $db->Execute($sql);

		?>		 
				   <select Name="cmb_coordinate">
					<option>---เลือกระบบพิกัด----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['sys_coor']."</option>";
							$result->MoveNext();
							}
						?>
				   </select>	
				   
			   <?PHP
		   $sql="select type from basemap_mm group by type  ";
				$result = $db->Execute($sql);

		?>		 
				   <select Name="cmb_filetype">
					<option>---เลือกประเภทไฟล์----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['type']."</option>";
							$result->MoveNext();
							}
						?>
				   </select>
				   &nbsp;
				   <label>
				  <input type="submit" name="button" id="button" value="Submit">
				  </label>
  </p>
</Form>		
		







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-11 10:59:37 By : กุนกุน
 


 

No. 2



โพสกระทู้ ( 3,748 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์
Facebook

ติดอะไรครับ เอา error มาดูครับ แล้วมันติดส่วนไหนด้วยครับ โค๊ดเยอะอย่างนี้ดูทั้งหมดคงจะลำบากครับ บอกมาเป็นจุดๆจะได้ดูง่ายๆหน่อยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-11 11:09:41 By : Dragons_first
 

 

No. 3

Guest


Parse error: syntax error, unexpected '{' in C:\AppServ\www\basemap\sh2.php on line 58


sh1.php
<html>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">

<?php


include("inc\adodb.inc.php");
include("inc\conn.php");

		$sql="select * from tyear";
		//$sql="select * from typefile";
		$result = $db->Execute($sql);
		
			
?>
	
		<style type="text/css">
<!--
.style1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 24px;
	color: #0000FF;
	font-weight: bold;
}
body {
	background-color: #D5F5F5;
}
.style3 {font-family: Arial, Helvetica, sans-serif; font-size: 20px; color: #0000FF; font-weight: bold; }
.style6 {font-size: 20px; color: #1C0CF6; font-family: Arial, Helvetica, sans-serif;}
-->
        </style>
	
<Form name="form1" target="LowFrame"  METHOD=POST action="sh2.php">	

		
				<p align="center" class="style1"><span class="style3"><span class="style6">  Website ข้อมูลแผนที่ Basemap  เหมืองแม่เมาะ </span></span></p>
<p align="center" class="style1">
			 
				 <select Name="cmb_year">
					<option>---เลือกปี พ.ศ.----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['cyear']."</option>";
							$result->MoveNext();
							}
						?>
				 </select> 
				 
				 
				 			   <?PHP
		   $sql="select datatype from basemap_mm group by datatype ";
				$result = $db->Execute($sql);

		?>		 
				   <select Name="cmb_datatype">
					<option>---เลือกประเภทข้อมูล----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['datatype']."</option>";
							$result->MoveNext();
							}
						?>
				   </select>	
				   
		
				   
		<?PHP
		   $sql="select sys_coor from basemap_mm group by sys_coor  ";
				$result = $db->Execute($sql);

		?>		 
				   <select Name="cmb_coordinate">
					<option>---เลือกระบบพิกัด----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['sys_coor']."</option>";
							$result->MoveNext();
							}
						?>
				   </select>	
				   
			   <?PHP
		   $sql="select type from basemap_mm group by type  ";
				$result = $db->Execute($sql);

		?>		 
				   <select Name="cmb_filetype">
					<option>---เลือกประเภทไฟล์----</option>		  
					<?
							while (!$result->EOF)
							{
							echo "<Option>".$result->fields['type']."</option>";
							$result->MoveNext();
							}
						?>
				   </select>
				   &nbsp;
				   <label>
				  <input type="submit" name="button" id="button" value="Submit">
				  </label>
  </p>
</Form>		
		




sh2.php
   <?php
$map_year  =$_POST["cmb_year"];
$map_datatype =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//echo $map_year;
//echo $map_filetype;
//echo $map_coordinate;
//exit;
?>

<meta http-equiv="Content-Type" content="text/html;charset=tis-620" />
<style type="text/css">
<!--
body {
	background-color: #F7F7D8;
}
.style2 {
	font-size: 16px;
	color: #3300FF;
}
.style6 {
	color: #CC00FF;
	font-weight: bold;
}
.style7 {color: #F802E4}
-->
</style>
          <tr>
        <td><div align="center">
            <p class="style64 style2 style6 style7">แผนที่ Basemap เหมืองแม่เมาะ </p>
          </div>
          <FORM METHOD=POST ACTION="basemapMMview.php">
         <h4><font color=#330000>
     
   <?php



$date_=$year_.$month_;
include("inc\adodb.inc.php");
include("inc\conn.php");
//$objConnect = mysql_connect("localhost","mineplan","kp302873","mineplan") or die("Error Connect to Database");     
$objDB = mysql_select_db("basemap_mm"); 
$strSQL="set names tis620";
$objQuery = mysql_query($strSQL);   
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
//$strSQL = "select * from  basemap_mm  where id like '$date_%' order by id desc";    

$map_year  =$_POST["cmb_year"];
$map_datatype =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//-------------------------------------------------------------
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"
	{//=====Year Only ==================================================================(2_พ.ศ)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"	{//=====datatype Only ==================================================================(3_ข้อมูล)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		$strSQL =$strSQL." Where datatype ='$map_datatype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{//=====Sys_CoOr Only ==================================================================(4_พิกัด)

		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";   
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
//-------------------------------------------------------------
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//=====type Only ==================================================================(5_ไฟล์)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		$strSQL =$strSQL." Where type ='$map_filetype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
//==================================================================(6_พ.ศ/ข้อมูล)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year' and  ";
		$strSQL =$strSQL." Where datatype ='$map_datatype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	//============================================================
		//========(7_พ.ศ/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL."where  type ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";	
	}
//---------------------------------------------------------	
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{


	//==============================================================================
	
	//========(8_พ.ศ/ไฟล์)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." type ='$map_filetype'  ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{

//========(9_ข้อมูล/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." datatype ='$map_datatype' and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{

//============================================================/

//========(10_ข้อมูล/ไฟล์)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." datatype ='$map_datatype' and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type ='$map_filetype'  ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
//======================================================


//========(11_ไฟล์/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL."where  type ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
//==============================================================================


//------------------------------------------------------------------//



	
	//===========(12_พ.ศ/ข้อมูล/พิกัด)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================
	
		//===========(13_พ.ศ/ข้อมูล/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type  ='$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================

	//===========(14_ข้อมูล/พิกัด/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type  ='$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================
	
	
	//======Year and TypeFile  and System CoOr ===========(15_พ.ศ/พิกัด/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." type  ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"		{
	
	//==================================================
	
	
	//======Year and TypeFile  and System CoOr ==================================================
			$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";   
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL." type  ='$map_filetype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
	}


//======Year and TypeFile ==============================================================

  
//$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
?> 
 <table width="1300" border="3"align="center"cellpadding="1" cellspacing="1" bordercolor="330033" bgcolor="#FF9999">
<tr bgcolor=#FFFFCC>
<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000><b>ลำดับที่</b></div></td> 

<td width="500" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>คำอธิบายประกอบ</div></td> 

<td width="250" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ประเภทข้อมูล</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ระบบพิกัด</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>TypeFile</div></td>

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ขนาดไฟล์</div></td> 

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>อัพโหลดเมื่อ</div></td>

</tr> 


<? 
$result=mysql_query($strSQL); 
if($result)
	{		while($objResult = mysql_fetch_array($result)) //objQuery
				{  
						?> 
						<tr> 
<TR bgcolor=#FFE4E1>
<td><div align="center"><b>
  <?=$objResult["id"];?>
</b></div></td>


<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["comment"];?>
</div></td>


<td><div align="center">
  <?=$objResult["datatype"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["sys_coor"];?>
</div></td>

<td><div align="center">
  <?=$objResult["type"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["size"];?>
</div></td>
<td bgcolor=#EED5D2><div align="center">
  <div align="center">
    <?=$objResult["upload"];?>
  </div>
						<?php 			
						//echo"1111";
						echo $objResult["DateUpload"];?>
						</div></td>
	  </tr> 
						<?   
				} 
?> 
</table> 
<? }else {echo "Nodata";}
mysql_close; 
?> 
     </form>
  </table>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-11 11:18:00 By : กุนกุน
 


 

No. 4



โพสกระทู้ ( 5,105 )
บทความ ( 4 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


เครื่องหมาย { ผิดพลาดในบรรทัดที่ 58
ถ้ามันไม่เกิน มันก็คงขาดหายไปล่ะ...
คุณต้องลองไล่ เครื่องหมาย { } เองแล้วล่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-11 11:29:57 By : apisitp
 


 

No. 5

Guest


น่าจะลืมปิด วงเล็บนะครับ
ลองเช็ค ตรง if ว่าปิดวงเล็บหมด รึเปล่านะครับ
Code (PHP)
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----"  )//<--ตรงนี้  
 {

//==================================================
//======Year and TypeFile  and System CoOr ==================================================

$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";  
$strSQL =$strSQL." From   basemap_mm ";
//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
//$strSQL =$strSQL." type  ='$map_filetype'  and ";
//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
$strSQL =$strSQL." Order by id desc  ";
}


ส่วนข้างล่างนี้เป็นแบบที่ผมแนะนำนะครับ มันน่าจะสั้นกว่า
แบบข้างบนมันยาวดูแล้วงงๆ
Code (PHP)
$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";  
$strSQL .= " From   basemap_mm WHERE 1=1";
if($map_year!="---เลือกปี พ.ศ.----"){
$strSQL .= " AND substring(upload,1,4) = ".$map_year."'";
}
//เพิ่มเงื่อนไขให้ครบตามต้องการนะครับ
$strSQL .=" Order by id desc  ";

จากด้านบน เช็คว่า combobox อันไหน มีการเลือก ก็ให้ต่อสริง ต่อท้ายไปนะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-11 11:32:29 By : hansolasus
 


 

No. 6

Guest


ค้นหาได้แล้วค่ะ แต่มันขึ้นหมดเลย ไม่ได้ขึ้นส่วนที่เราหาอ่ะค่ะ ทำไงดี
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-11 11:42:25 By : กุนกุน
 


 

No. 7

Guest


ลองเช็คเงื่อนไข ใน if ดีๆนะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-11 11:54:31 By : hansolasus
 


 

No. 8

Guest


[size=14ptช่วยดูให้หน่อยนะค่ะ ติดแค่นี้ก็จะเสร็จแล้วค้า T^T[/size]



7


Code (PHP)
<?php
$map_year  =$_POST["cmb_year"];
$map_datatype =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//echo $map_year;
//echo $map_filetype;
//echo $map_coordinate;
//exit;
?>

<meta http-equiv="Content-Type" content="text/html;charset=tis-620" />
<style type="text/css">
<!--
body {
	background-color: #F7F7D8;
}
.style2 {
	font-size: 16px;
	color: #3300FF;
}
.style6 {
	color: #CC00FF;
	font-weight: bold;
}
.style7 {color: #F802E4}
-->
</style>
          <tr>
        <td><div align="center">
            <p class="style64 style2 style6 style7">แผนที่ Basemap เหมืองแม่เมาะ </p>
          </div>
          <FORM METHOD=POST ACTION="basemapMMview.php">
         <h4><font color=#330000>
     
   <?php



$date_=$year_.$month_;
include("inc\adodb.inc.php");
include("inc\conn.php");
//$objConnect = mysql_connect("localhost","mineplan","kp302873","mineplan") or die("Error Connect to Database");     
$objDB = mysql_select_db("basemap"); 
$strSQL="set names tis620";
$objQuery = mysql_query($strSQL);   
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
//$strSQL = "select * from  basemap_mm  where id like '$date_%' order by id desc";      
//$strSQL = "select * from  basemap_mm  order by id desc";    
//$strSQL = "select * from  basemap_mm  where id like '$%date%'  order by id desc";    

$map_year  =$_POST["cmb_year"];
$map_datatype =$_POST["cmb_datatype"];
$map_coordinate = $_POST["cmb_coordinate"]   ;
$map_filetype =$_POST["cmb_filetype"];

//-------------------------------------------------------------

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")
	
	
{

	//=====Year Only ==================================================================(2_พ.ศ)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";  
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")	
{//=====datatype Only ==================================================================(3_ข้อมูล)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		$strSQL =$strSQL." Where datatype ='$map_datatype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")		
{//=====Sys_CoOr Only ==================================================================(4_พิกัด)

		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";   
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		//$strSQL =$strSQL." Where type like  ='$map_filetype'  and ";
		$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

//-------------------------------------------------------------
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")		
{
	
	//=====type Only ==================================================================(5_ไฟล์)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'   ";
		$strSQL =$strSQL." Where type ='$map_filetype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and 
$map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")	
{
	
//==================================================================(6_พ.ศ/ข้อมูล)
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year' and  ";
		$strSQL =$strSQL." Where datatype ='$map_datatype' ";
		//$strSQL =$strSQL." Where sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")		
{
	//============================================================
		//========(7_พ.ศ/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL."where  type ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";	
}

//---------------------------------------------------------	
if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")		
{


	//==============================================================================
	
	//========(8_พ.ศ/ไฟล์)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." type ='$map_filetype'  ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")		
{

//========(9_ข้อมูล/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." datatype ='$map_datatype' and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")		
{

//============================================================/

//========(10_ข้อมูล/ไฟล์)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  "; 
		$strSQL =$strSQL." datatype ='$map_datatype' and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type ='$map_filetype'  ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")	
{
//======================================================


//========(11_ไฟล์/พิกัด)============//
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL."where  type ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")	
{
//==============================================================================


//------------------------------------------------------------------//



	
	//===========(12_พ.ศ/ข้อมูล/พิกัด)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")		
{
	
	//==================================================
	
		//===========(13_พ.ศ/ข้อมูล/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type  ='$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")	
{
	
	//==================================================

	//===========(14_ข้อมูล/พิกัด/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." datatype  ='$map_datatype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." type  ='$map_filetype' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")	
{
	
	//==================================================
	
	
	//======Year and TypeFile  and System CoOr ===========(15_พ.ศ/พิกัด/ไฟล์)=======================================
		$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload "; 
		$strSQL =$strSQL." From   basemap_mm ";
		$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		$strSQL =$strSQL." type  ='$map_filetype'  and ";
		$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}

if($map_year!="---เลือกปี พ.ศ.----" and $map_datatype == "----เลือกประเภทข้อมูล----" and $map_coordinate =="---เลือกระบบพิกัด----" and $map_filetype =="---เลือกประเภทไฟล์----")	
{
	
	//==================================================
	
	
	//======Year and TypeFile  and System CoOr ==================================================
			$strSQL = "select id,filesname,datatype,sys_coor,comment,substring(upload,1,4) as YearUpload,id,type,size,substring(upload,1,10) as DateUpload ";   
		$strSQL =$strSQL." From   basemap_mm ";
		//$strSQL =$strSQL." Where substring(upload,1,4) = '$map_year'  and  ";
		//$strSQL =$strSQL." type  ='$map_filetype'  and ";
		//$strSQL =$strSQL." sys_coor = '$map_coordinate' ";
		$strSQL =$strSQL." Order by id desc  ";
}
	


//======Year and TypeFile ==============================================================

  
//$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
?> 


<table width="1300" border="3"align="center"cellpadding="1" cellspacing="1" bordercolor="330033" bgcolor="#FF9999">
<tr bgcolor=#FFFFCC>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000><b>ลำดับที่</b></div></td> 

<td width="500" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>คำอธิบายประกอบ</div></td> 

<td width="250" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ประเภทข้อมูล</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ระบบพิกัด</div></td>

<td width="70" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>TypeFile</div></td>

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>ขนาดไฟล์</div></td> 

<td width="100" bgcolor="#CDB7B5"> <div align="center"><font color=#990000>อัพโหลดเมื่อ</div></td>

</tr> 


	<?php 
$result=mysql_query($strSQL); 
if($result)
	{		while($objResult = mysql_fetch_array($result)) //objQuery
				{
				{
	?> 
	
						<tr> 
<TR bgcolor=#FFE4E1>
<td><div align="center"><b>
  <?=$objResult["id"];?>
</b></div></td>


<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["comment"];?>
</div></td>


<td><div align="center">
  <?=$objResult["datatype"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["sys_coor"];?>
</div></td>

<td><div align="center">
  <?=$objResult["type"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <?=$objResult["size"];?>
</div></td>

<td bgcolor=#EED5D2><div align="center">
  <div align="center">
    <?=$objResult["upload"];?>
  </div>
						<?php 			
						//echo"1111";
						echo $objResult["DateUpload"];
						?>
						</div></td>
	  </tr> 
	  
						<?php   
				} 
				
			}
						?> 
</table> 

<?php
 }else {echo "Nodata";}

mysql_close; 
?> 
     </form>
  </table></tr>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-12 09:55:59 By : กุนกุน
 


 

No. 9



โพสกระทู้ ( 1,569 )
บทความ ( 2 )



สถานะออฟไลน์
Twitter Facebook Blogger

ขอเถอะครับ อย่าทำตัวแดงใหญ่ๆ แบบนี้เลย มันอ่านข้อมูลลำบากเปล่าๆ ;___;


ประวัติการแก้ไข
2013-12-12 11:18:13
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-12 11:17:45 By : itpcc
 


 

No. 10



โพสกระทู้ ( 5,105 )
บทความ ( 4 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


ปัญหาเดิม ๆ ลองค้นดู มีทางแก้หมดแล้วครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-12-12 12:09:13 By : apisitp
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ขออนุญาตสอบถาม โค้ดค้นหาข้อมูลแบบ list/menu ค้า ^^
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่