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 > ดึงข้อมูลจากด้าต้าเบสยังไงคะที่ทำให้หน้าสิ้นค้ากับหน้ารายละเอียดสินค้าตรงกัน



 

ดึงข้อมูลจากด้าต้าเบสยังไงคะที่ทำให้หน้าสิ้นค้ากับหน้ารายละเอียดสินค้าตรงกัน

 



Topic : 076260



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



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



คือดูที่หน้ารายการสินค้าเป็นชื่อที่ถูกต้องค่ะ แต่พอเข้าไปดูรายละเอียดของสินค้ามันไม่ใช่ค่ะรายละเอียดถูกแต่ชื่อผิดค่ะ



Tag : PHP, MySQL, HTML/CSS







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-03-28 14:05:33 By : toryairuk View : 895 Reply : 4
 

 

No. 1



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



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

ต้องดู ดาต้า เบส ละครับ ว่า ทั้งสองอย่างมีอะไรเกี่ยวโยงกัน ทางที่ดีก็ลองเอาโค้ด มาแปะ ดูจะได้รู้สาเหตุ ของการผิดตัว ผิดฝา






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-28 15:14:15 By : lootboom
 


 

No. 2



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



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

คือมันเป็นเหมือนว่าไปเอาชื่อสินค้าที่ขายดีอันที่สามมาค่ะ ชื่อสินค้าก็เลยเป็นอันเดียวกันหมดค่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-28 15:21:24 By : toryairuk
 

 

No. 3



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



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

เอามาแปะแล้วนะคะ




<?
@session_start();
session_register('s_login');
?>
<?
ob_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ร้านจำหน่ายปลาสวยงามและอุปกรณ์ทุกชนิด</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin=0 topmargin=0 bgcolor="#BFA487">
<?
$show_id=$_GET[show_id];
include "connect.php";
$sql3 ="select * from product where product_id='$show_id' " ;
$result3=mysql_db_query($db,$sql3);
$rs3=mysql_fetch_array($result3);
$product_id=$rs3[product_id];
$product_id_code=sprintf ("%05d" ,$product_id);
$product_name=$rs3[product_name];
$product_detail=$rs3[product_detail];
$product_price=$rs3[product_price];
$picture=$rs3[picture];
?>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="17" background="images/bg_left.gif"><img src="images/bg_left.gif" width="17" height="16"></td>
<td width="950" align=lift valign=top><table width="950" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=lift valign=top>
<? include "menu.php"; ?>
</td>
</tr>
<tr>
<td height="20" align=lift valign=top><table width="950" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" height="20" align=lift valign=top background="images/B_menu.jpg">
<? include "menu_left.php"; ?>
</td>
<td align=lift valign=top><table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" background="images/bg_title2.jpg"><p align="left" class="menu2">&nbsp;&nbsp;สินค้า</p></td>
</tr>
<tr>
<td lign=left valign=top><table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td> <div align="center"><?
echo "<IMG SRC='admin/picture/$picture'>";?>
</div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td background="images/icon_02.gif"><img src="images/icon_02.gif" width="5" height="5"></td>
</tr>
<tr>
<td valign=top lign=left><p align="left" class="p"><strong>รหัสสินค้า
:</strong> <? echo $product_id_code?></p></td>
</tr>
<tr>
<td valign=top lign=left><p align="left" class="p"><strong>ชื่อสินค้า
:</strong> <? echo $product_name?></p></td>
</tr><? echo $sql3;?>
<tr>
<td valign=top lign=left><p align="left" class="p"><strong>ราคา
:</strong>

<?

$number =$product_price;
$number2=number_format($number,2,'.',',');

if ($number2 <> 0){
$x=$number2 ."&nbsp;บาท";
}else{
$x="สนใจติดต่อ";
}
echo " $x ";
?>

<br>
</p></td>
</tr>
<tr>
<td valign=top lign=left><p align="left" class="p"><strong>รายละเอียดสินค้า
:</strong><? echo $product_detail?> <br>
</p></td>
</tr>
<tr>
<td valign=top lign=left>&nbsp;</td>
</tr>
<tr>
<td valign=top lign=left><p align="left" class="p"><img src="images/icon_01.gif" width="9" height="9">
<a href="basket_add.php?product_id=<? echo $product_id ; ?>">หยิบใส่ตะกร้า</a></p></td>
</tr>
<tr>
<td background="images/icon_02.gif"><img src="images/icon_02.gif" width="5" height="5"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align=lift valign=top>
<? include "footer.php"; ?>
</td>
</tr>
</table></td>
<td width="17" background="images/bg_right.gif"><img src="images/bg_right.gif" width="17" height="16"></td>
</tr>
</table>
</body>
</html>
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-28 15:45:41 By : toryairuk
 


 

No. 4



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



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

รันในmyadminก้อถูกแล้วค่ะ ข้อมุลถุกค่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-28 16:50:58 By : toryairuk
 

   

ค้นหาข้อมูล


   
 

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