var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Please correct this Query
I need something like below query, i tried it but did not work error comes with "Syntax error"
select payments.id, payments.cid, payments.ctype, payments.date from payments
if(payments.ctype = 2, join clientst1 ON payments.cid = clientst1.cid)
elseif(payments.ctype = 3, join clientst3 ON payments.cid = clientst3.cid)
elseif(payments.ctype = 4, join clientst4 ON payments.cid = clientst4.cid)
if(payments.ctype = 2, clientst1.customer_id = 4)
if(payments.ctype = 3, clientst3.customer_id = 4)
if(payments.ctype = 4, clientst4.customer_id = 4)
why do you have three different client tables? can't you see how much unnecessary complexity this forces into your query?
imagine what your SQL would be like if you had only one client table
The problem is, i am working other designed database, and if i will change the structure his Desktop application will not work.
then you are in the stinky stuff pretty deep, eh
Originally Posted by abdul_zu
hey, let me ask you a question
your SELECT clause returns only columns from the payments table
why are you bothering with the clients table anyway?