In following query, is there any possibility to having different results for different conditions?
SELECT * FROM `table` WHERE ((COND1) || (COND2) || (COND3 AND COND4) || COND5);
I mean if search token stoped at a record for COND2 then result having some number or anything that we want. some thing like this:
I need something like this
SELECT someVar FROM `table` WHERE ((COND1 then someVar=5)...
that results something like this:
╔═════════╗
║ someVar ║
╠═════════╣
║ 5 ║
╠═════════╣
║ 6 ║
╠═════════╣
║ 19 ║
╚═════════╝
In my case I want to search duplicates in some specific cases so I'm giving a bunch of ids and duplicate conditions to a query, and I need that query returns me which id has a dupicate, it returns me which id is duplicate by given id. sorry for my bad english
this is my query:
SELECT `bId` FROM `betmatches` WHERE `user`='1' AND `status`='paid' AND ((`zpo`='zpo2' AND `mId`='2355') OR (`zpo`='zpo2' AND `mId`='2367'))
if following condition was true
(`zpo`='zpo2' AND `mId`='2355')
i need query to result me some number like 5