Welcome Guest, Not a member yet? Register   Sign In
SQL question / advice
#5

[eluser]nevsie[/eluser]
hi all,
Thanks for the reply... and i will be testing out the ideas and seeing which works best in this scenario...

I will be looking into distinct first, however, the problem that i have is that this is for a pre-existing ecommerce facility... And i am looking to add on a search conditional that just adds to WHERE part of the SQL statement.
The reason is that i do not want to duplicate / reproduce chunks of code specifically for this different search feature. Therefore, if i can just add a small piece of code to the WHERE part without influencing speed and performance it will be the cleanest coding option - admittedly it might not be the right choice overall.

To give you an idea of the search facility currently there (with virtually all options turned off i have:

Code:
SELECT $fields FROM $db_tables[products] as products $join WHERE $search_condition GROUP BY products.product_id $sorting $limit

If you imagine that the $fields part is multiple fields across multiple tables, various joins occurring, and there are other where statements already included.... I imagine this will severely influence the DISTINCT part of the query... Although reading more, it might nt be a problem actually... let me trial and get back... any other tips while i work is appreciated! Cheers Guys, N


Messages In This Thread
SQL question / advice - by El Forum - 10-23-2008, 12:06 PM
SQL question / advice - by El Forum - 10-23-2008, 01:11 PM
SQL question / advice - by El Forum - 10-23-2008, 01:20 PM
SQL question / advice - by El Forum - 10-23-2008, 01:24 PM
SQL question / advice - by El Forum - 10-23-2008, 01:47 PM
SQL question / advice - by El Forum - 10-23-2008, 01:53 PM
SQL question / advice - by El Forum - 10-23-2008, 01:56 PM
SQL question / advice - by El Forum - 10-23-2008, 02:25 PM
SQL question / advice - by El Forum - 10-23-2008, 07:50 PM
SQL question / advice - by El Forum - 10-24-2008, 02:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB