Jump to content

query issue


Alicia

Recommended Posts

Hi,

 

May I know how can I get a proper query for this requirement :

 

SELECT * FROM Table WHERE columnA = 1 AND columnB =($A || $B || $C || $D )

$A,$B,$C and $D are values posted by user. If any of those variables have nothing inside/no value, it will not be included in the query.

 

E.g : If $(c == "") . the query will be

*SELECT * FROM Table WHERE columnA = 1 AND columnB =($A || $B || $D )

 

I tried conditional statement to accomplish this but failed. Some guru please advise on this. Thank you.

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/182601-query-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.