Hello,
I would like to retrieve unique values from a database without using the distinct keyword.
Here is what I have tried till now, any help regarding this is appreciated.
Code:SELECT prds.id,prds.nm,prds.short_name,prds.price,depts.nm AS 'dept_name' FROM prds,depts,prod_dept WHERE (prds.nm LIKE '%" . $search . "%' OR prds.short_name LIKE '%" . $search . "%' OR prds.short_desc LIKE '%" . $search . "%' OR prds.long_desc LIKE '%" . $search . "%' OR depts.nm LIKE '%" . $search . "%') AND prod_dept.prod_id=prds.id AND prod_dept.dept_id = depts.id ORDER BY prds.nm ASC
Bookmarks