jason213123
July 1st, 2008, 06:36 AM
hi,
i have a table with all records that people say about a product for example
table:xxx
field: id , date, comment, product_owner_id
imagine that i have 100 records of comment for a product and 250 for other product and none for other product and now i want say that:
owner 1 have:
-product 1 have 100 records
-product 2 have 250 records
-product 3 have 0 records
owner 2 have:
-product 1 have 0 records
-product 2 have 0 records
-product 3 have 110 records
and so long, there is a way to build a simple query that donīt spend very resource of cpu? the db that i using is mysql
thanks a lot for your help
i have a table with all records that people say about a product for example
table:xxx
field: id , date, comment, product_owner_id
imagine that i have 100 records of comment for a product and 250 for other product and none for other product and now i want say that:
owner 1 have:
-product 1 have 100 records
-product 2 have 250 records
-product 3 have 0 records
owner 2 have:
-product 1 have 0 records
-product 2 have 0 records
-product 3 have 110 records
and so long, there is a way to build a simple query that donīt spend very resource of cpu? the db that i using is mysql
thanks a lot for your help