[eluser]Cosai[/eluser]
I want a query like this:
IF sometable.id=-1THEN
select "" as name1
ELSE
select othertable.name as name1
END
From sometable,othertable
LEFT JOIN
sometable.id=othertable.sid
There are some fields on sometable that doesn't (shouldn't) match on othertable. If the field matches then I need to get name on other table else the name should appear 0
(Don't ask me why is it like that. Someone has done this sh.tty database design)
also is it possible to start a query then before taking result of that starting another query?
Thank you for your help.