Select to view content in your preferred language

query.where issu

1118
12
Jump to solution
05-14-2013 02:42 AM
khadijaahal_el_fadl
New Contributor
Hi , i try to query  on more than one field, I want to have somthing like
"query.where= "field1='"+value1+"'" && "field2='"+value2+"'" ; but it doesn't work, it consider just the last field :it works as it was one only field wich is the last one.  if you have Any idea please
0 Kudos
12 Replies
KenBuja
MVP Esteemed Contributor
Try this instead

if( val1&&val2){q.where="p_from='"+val1+"' AND p_to='"+val2+"'";}
0 Kudos
khadijaahal_el_fadl
New Contributor
Try this instead

if( val1&&val2){q.where="p_from='"+val1+"' AND p_to='"+val2+"'";}


thank you so much ,It works finally thanks to you 🙂
0 Kudos
KenBuja
MVP Esteemed Contributor
Gald to help. When you run into problems like this, you should use the debugger to see how the where clause is interpreted by the code.

Don't forget to click the check mark on the post that best answered your question.
0 Kudos