Neeks Posted March 9, 2015 Posted March 9, 2015 I'm looking to use an OR selector with blank values. project=1024|'' : RESULT: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'field_project' project=1024| : RESULT: same as above. I basically want all the results for "project=" and all the results for "project=1024" in one nice little result. Any one know how I can accomplish the same result in another way? ProcessWire Version 2.5.3
LostKobrakai Posted March 10, 2015 Posted March 10, 2015 Did you try OR groups? (project=1024), (project="") Also your error suggests, that it's doesn't have to be a problem with the selector itself. Does it work with just the id? 2
Neeks Posted March 10, 2015 Author Posted March 10, 2015 It does work with just the ID. I also got an SQL error of 1066, but I tried a bunch of invalid stuff trying to make that query work how I wanted it ;-) The OR groups did exactly what I needed. Thanks! They are such an elegant and simple solution. I remember when they groupings where first introduced to the API and I don't think I really understood them and how helpful they where until now. Thanks LostKobrakai!!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now