View of all components & their details
Actors
Guest, User, Admin
Scenario
- The user clicks on the "COMPONENTS" dropdown
- A list of all the component types is displayed and the users chooses one
- A popup of all the components of that type is displayed
SELECT * FROM components WHERE name ILIKE ('%' || $q || '%') ORDER BY CASE WHEN $sort = 'price_asc' THEN price END ASC, CASE WHEN $sort = 'price_desc' THEN price END DESC, price DESC LIMIT COALESCE($limit, 100);
- The user can sort by price
- The users can view the details of a component by clicking on it
SELECT * FROM components WHERE id = $componentId LIMIT 1; SELECT * FROM $details_table -- cpu/gpu/memory/storage/power_supply/motherboard/pc_case/cooler/... WHERE component_id = $componentId LIMIT 1; -- if type == pc_case: SELECT * FROM case_storage_form_factors WHERE case_id = $componentId; SELECT * FROM case_ps_form_factors WHERE case_id = $componentId; SELECT * FROM case_mobo_form_factors WHERE case_id = $componentId; -- if type == 'cooler': SELECT * FROM cooler_cpu_sockets WHERE cooler_id = $componentId;
Last modified
7 minutes ago
Last modified on 12/29/25 01:07:49
Attachments (3)
- componentDetails.png (128.6 KB ) - added by 8 minutes ago.
- componentList.png (104.2 KB ) - added by 7 minutes ago.
- componentsDropdown.png (111.0 KB ) - added by 7 minutes ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.



