osclass Counting number of Sales of specifed id products
问题 I have this table item_log : fk_i_item_id product amount currency status $sales = $conn->osc_dbFetchResult("SELECT COUNT(status) FROM %st_item_log WHERE fk_i_item_id = '%s' AND status = 'COMPLETED'", DB_TABLE_PREFIX,osc_logged_user_id()); echo $sales['COUNT(status)'] I want to count total number of sales of an product in the same echo. ex *********************************************************** fk_i_item_id product amount currency status ****************************************************