![]() |
Alexey admin 12/6/2006 |
Matt, |
M
|
matt.cohen author 12/6/2006 |
Hi, |
L
|
larsonsc 12/7/2006 |
I am running PHPRunner 3.1 and publishing the built pages on XP profession using PHP5 and Apache server. I can not seem to figure the correct syntax for the following statement. From [Service Records] Where ((AccountingOptions<>'INVOICED' or AccountingOptions<>'N/A') and Progress='COMP') I can successfully get a single condition as in " Where AccountingOptions<>'INVOICED' " but more than one condition seems to not work as expected. Any clues would be greatly appreciated.
From [Service Records] |
J
|
Jane 12/7/2006 |
Matt, From [Service Records] Where ((AccountingOptions<>'INVOICED' and AccountingOptions<>'N/A') and Progress='COMP') |
M
|
matt.cohen author 12/7/2006 |
Hi Jane, |
J
|
Jane 12/7/2006 |
Matt, Where (Progress ='COMP' and AccountingOptions<> 'N/A') or (Progress ='COMP' and AccountingOptions<> 'INVOICED') |
M
|
matt.cohen author 12/8/2006 |
Matt, sorry for my fault. Here is a correct query: Where (Progress ='COMP' and AccountingOptions<> 'N/A') or (Progress ='COMP' and AccountingOptions<> 'INVOICED')
|
J
|
jim9 12/8/2006 |
If you develop on a local machine, with mysql, you could download and install sqlyog, there's a free version. Then using sqlyog you could pratice til the query is correct. Sqlyog doesn't work with parameters, but you could input the real data for testing, I.E., 5 instead of a variable. |
![]() |
Alexey admin 12/11/2006 |
Matt, I am trying to display the records that have "COMP' in the "Progress" column and that do have "N/A" or "INVOICED" in the "AccountingOptions" column. Here is the WHERE clause that satisfies your requirements. where Progress='COMP' and (AccountingOptions='N/A' or AccountingOptions='INVOICED') |