Jump to content

[SOLVED] Help


tauchai83

Recommended Posts

Hi all,

 

I have one table that contain 2 primary key, pd_id and od_id and additional column od_qty (order quantity).

 

i'm trying to do a query that can retrive the total of the order quantity for each product.

 

here is my code:

 

$total = mysql_query("SELECT pd_id, SUM(od_qty) AS cnt FROM order_item WHERE pd_id=$pd_id ");

 

it returns Resource id #4 which i Don't know what does it means. Can anyone help me? thanks a lot!

 

-chai-

Link to comment
https://forums.phpfreaks.com/topic/37608-solved-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.