 |
สอบถามเรื่องการ join ตารางหน่อยครับ คือผมต้องการส่งค่า มาแสดงอีกหน้านึง แต่มันขึ้น ERROR ครับ |
|
 |
|
|
 |
 |
|
34.$sql="select order_detail.*,orders.*,re_product.* from (order_detail inner join orders on order_detail.order_id=orders.order_id)inner join re_product on order_detail.order_id=re_product.order_id where order_id=$order_id and de_status=$de_status and id_pro=$id_pro";
036.$result = mysql_query($sql) or die(mysql_error()."<br />[$sql]");
เติมสีแดงเข้าไปแล้วเอา error มาดูกัน
|
 |
 |
 |
 |
Date :
2015-03-18 16:42:15 |
By :
ไม่ทราบแหล่งที่มา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มีเรื่องนึงอยากขอร้องน่ะครับ ......... ช่วยเปลี่ยนภาพ avatar หน่อย ผมเห็นแล้วอยากจะอาเจียร
จะพาลหาเรื่องไม่ตอบกระทู้เอา 
|
 |
 |
 |
 |
Date :
2015-03-18 16:46:43 |
By :
ไม่ทราบแหล่งที่มา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
34.$sql="select order_detail.*,orders.*,re_product.* from (order_detail inner join orders on order_detail.order_id=orders.order_id)inner join re_product on order_detail.order_id=re_product.order_id where orders .order_id=$order_id and de_status=$de_status and id_pro=$id_pro";
|
 |
 |
 |
 |
Date :
2015-03-18 16:49:27 |
By :
ไม่ทราบแหล่งที่มา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
34.$sql="select order_detail.*,orders.*,re_product.* from (order_detail inner join orders on order_detail.order_id=orders.order_id)inner join re_product on order_detail.order_id=re_product.order_id where orders.order_id=$order_id and de_status=$de_status and id_pro=$id_pro";
|
 |
 |
 |
 |
Date :
2015-03-18 16:50:33 |
By :
ไม่ทราบแหล่งที่มา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
รอบนี้ขึ้นแบบนี้ครับ

|
 |
 |
 |
 |
Date :
2015-03-18 17:06:47 |
By :
hoyahoya |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
34.$sql="select order_detail.*,orders.*,re_product.* from (order_detail inner join orders on order_detail.order_id=orders.order_id)inner join re_product on order_detail.order_id=re_product.order_id where orders.order_id=$order_id and de_status=$de_status and order_detail.id_pro=$id_pro";
ขอบคุณครับที่รับฟัง
|
 |
 |
 |
 |
Date :
2015-03-18 17:10:04 |
By :
ไม่ทราบแหล่งที่มา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
...... in where clause is ambigious
มีชื่อฟิวด์ซ้ำกันในตารางที่เอามาจอยกันครับ เลยต้องระบุว่าเอามาจากตารางไหน
orders.order_id=$order_id
order_detail.id_pro=$id_pro
|
 |
 |
 |
 |
Date :
2015-03-18 17:18:19 |
By :
ไม่ทราบแหล่งที่มา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
รบกวนอีกนิดครับ ถ้าอยากให้แสดงเฉพาะรหัสสินค้าที่ เรา request มา จะต้องทำยังงัยครับ
ตอนนี้มันมาทั้ง 2 ตัวเลยครับ

|
 |
 |
 |
 |
Date :
2015-03-18 17:40:17 |
By :
hoyahoya |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|