gazzzzzza Posted June 24, 2004 Posted June 24, 2004 Is it possible to modify the select statement ($listing_sql) on index.php to get only the products that have a different name? I was thinking along the lines of using DISTINCT but only on one column, the product_name column. I ask because I need to remove all duplicate entries from the product listing. (There are duplicates in there to allow another of my modifications to work-it was highly important!!) At the moment, it gets the list, then I only show the ones that have different names. It works this out by matching the listed name against an array of names already shown on the page. This works great BUT the links at the bottom of the page show 'showing products 1 of 3' when i only want it to show 1 of 1. This is because two of the 3 products are duplicates...obviously this messes up the navigation. So really i need to get in and edit the list befor eit splits it into pages. I hope someone understands! I have tried messing with the DISTINCT command but it doesnt work because all of the product ids are different. i hope their is a command that does this! i looked into unique arrays fucntions but i am hoping there is a simpler way... always here to offer some useless advice....
Recommended Posts
Archived
This topic is now archived and is closed to further replies.