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 > ช่วยด้วยครับ!!!!!!!!!! ต้องใช้คำสั่งอารัยอ่ะครับ ถึงดึงสินค้าทั้งหมดของผู้ฝากขายคนที่1ออกมาแสดง



 

ช่วยด้วยครับ!!!!!!!!!! ต้องใช้คำสั่งอารัยอ่ะครับ ถึงดึงสินค้าทั้งหมดของผู้ฝากขายคนที่1ออกมาแสดง

 



Topic : 115554



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



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




ต้องใช้คำสั่งอารัยอ่ะครับ ถึงดึงสินค้าทั้งหมดของผู้ฝากขายคนที่1ออกมาแสดง
id

Code (PHP)
<? @session_start(); @ob_start;
if($_SESSION["user_consign"] ==""){
echo "<script language='javascript'> alert ('กรุณากลับไปLoginก่อนถึงจะตั้งคำถามได้');</script>";
echo "<script language='javascript'> history.back(1);</script>";
exit();
}

//============ Start Session และทำการเรียก Function ติดต่อฐานข้อมูล 
include"../connect.php";
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.::รายละเอียดข้อมูลสินค้า::.</title>
<style type="text/css">
<!--
.style5 {
	color: #000000;
	font-weight: bold;
}
.style6 {font-size: 14px}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style>
</head>
<body>
      <table width="846" height="420" border="1" align="center" cellpadding="0" cellspacing="1">
        <tr>
          
          <td width="844" valign="top">
            <table width="894" height="27" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><div align="center">
<?
include"../connect.php";
$strSQL ="SELECT * FROM product INNER JOIN theconsignment ON product.id_consign = theconsignment.id_consign where id_pro='$_GET[id_pro]' ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
if(mysql_num_rows($objQuery)){
	while($row_select=mysql_fetch_array($objQuery)){
?>
<table width="283" height="23" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td><div align="center">
                    <form name="form2" method="post" action="">
                      <span class="style5">
                    <input type="image" name="imageField3" id="imageField3" src="../image/Detail.gif">
                    ข้อมูลรถมอเตอร์ไซค์ของคุณ </span>
                      <span class="style5">
                      <input type="image" name="imageField4" id="imageField4" src="../image/Detail.gif">
                      </span>
                    </form>
                    </div></td>
                </tr>
            </table><div align="right" class="style6"> <a href="show_pro.php">กลับหน้าหลัก </a></div>
            </div></td>
  </tr>
</table>       
            

<table width="839" height="138" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><img src="../product/uploaded/<?php echo $row_select["image1_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="../product/uploaded/<?php echo $row_select["image2_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="../product/uploaded/<?php echo $row_select["image3_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="../product/uploaded/<?php echo $row_select["image4_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="../product/uploaded/<?php echo $row_select["image5_pro"];?>" width="163" height="163" border="0"></td>
  </tr>
</table>

<table width="491" height="223" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"><font color="#000000">
  <tr>
    <td> <font color="#000000"><p align="center"><strong>รายละเอียดข้อมูลรถมอเตอร์ไซค์</strong></p>
      <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
    <tr>
          <td><font color="#000000"><strong>เลขที่การฝากขายสินค้า :</strong></td>
      <td><font color="#000000"><?=$_GET["id_pro"];?></td>
    </tr>
    <tr>
      <td width="47%"><font color="#000000"><strong>ยี่ห้อรถมอเตอร์ไซค์ :</strong></td>
      <td width="53%"><font color="#000000"><?php echo $row_select['brand_pro'] ; ?></td>
    </tr>
    <tr>
      <td><font color="#000000"><strong>รุ่นของรถ : </strong></td>
      <td><font color="#000000"><?php echo $row_select['generate_pro'] ; ?></td>
    </tr>
    <tr>
      <td><font color="#000000"><strong>ปีที่จดทะเบียน  :</strong></td>
      <td><font color="#000000"><?php echo $row_select['registyear_pro'] ; ?></td>
    </tr>
    <tr>
      <td><font color="#000000"><strong>สีรถ :</strong></td>
      <td><font color="#000000"><?php echo $row_select['color_pro'] ; ?></td>
    </tr>
    <tr>
      <td><font color="#000000"><strong>ราคาที่ต้องการขาย :</strong></td>
      <td><font color="#000000"><?php echo $row_select['price_pro'] ; ?></td>
    </tr>
     <tr>
      <td><font color="#000000"><strong>วันที่ฝากขาย :</strong></td>
      <td><font color="#000000"><?php echo $row_select['date_pro'] ; ?></td>
    </tr>
    <tr>
      <td><font color="#000000"><strong>สถานะการยืนยันการฝากขาย :</strong></td>
      <td><font color="#000000"> <?
		  if($row_select["status_pro"]=="1")
		  {
		  echo "รอการยืนยัน";
		  }
		  else
		  {
		  echo "ยืนยันแล้ว";
		  }
		  ?></td>
    </tr>
      </table></td>
  </tr>
</table>
<?
}
}
?>
<center>
          </td>
        </tr>

   
</body>
</html>





Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2015-04-01 16:27:15 By : newnot View : 698 Reply : 2
 

 

No. 1



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



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


การใช้ inner join ต้องแน่ใจว่ามีข้อมูล ตรงกัน ทั้งสองตาราง อย่างน้อย 1 ชุด จาก on clause นะครับ
ไม่อย่างนั้น จะไม่มีข้อมูลออกมา

แต่ถ้าเป็น left join จะมีข้อมูลออกมาเสมอ จากตารางด้านซ้าย
ก็เลือกใช้งานตามความเหมาะสมนะครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-04-02 05:23:19 By : Chaidhanan
 


 

No. 2



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



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


อ่อครับ ขอบคุณมากครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-04-02 08:44:42 By : newnot
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยด้วยครับ!!!!!!!!!! ต้องใช้คำสั่งอารัยอ่ะครับ ถึงดึงสินค้าทั้งหมดของผู้ฝากขายคนที่1ออกมาแสดง
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 00
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 อัตราราคา คลิกที่นี่