Hey all,
i know its the scripting section, but it looks like the best section to post this.
i am currently busy with a database. want to show al bot info on a table( this is working)
but now i want, to display the table based on 1 or 2 inputs.
so if i search on proxy. all account with this proxy will showed.
or if i search on category all accounts of this category will be showed.
and last but not least is i search on a proxy and category i want to show alle account with selected proxy and category
the problem is i only get 1 of the 3 worked in 1 query. so only searching on account/proxy.
i guess the problem is using AND and OR wrong, but cant find the solution. so maybe anyone here can help me with it.
SELECT a.id, a.rslogin, a.rswachtwoord, a.gebruikersnaam, p.proxy, c.subcategory
FROM bots a
INNER JOIN proxy p ON a.proxy_id=p.id
INNER JOIN subcategory c ON a.category_id=c.subcat_id
WHERE proxy_id = $proxy AND category_id = $sub_category
OR category_id = $sub_category
OR proxy_id = $proxy
thank for the time
jappa