hellomoto Posted November 21, 2017 Share Posted November 21, 2017 I have $select = 'template=post, when<=now, sort=when, '; $results = $pages->find($select); then output the results' data. It works fine without the sort=when. With it, I get this: Error: Exception: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: '_sort_when' (in /Applications/AMPPS/www/website/wire/core/PageFinder.php line 384) what is this I have this elsewhere $start = date('Y', $pages->get($select.' sort=when')->getUnformatted('when')); and it works fine, returns the earliest year. Link to comment Share on other sites More sharing options...
adrian Posted November 21, 2017 Share Posted November 21, 2017 Have you tried without the trailing comma? Link to comment Share on other sites More sharing options...
hellomoto Posted November 21, 2017 Author Share Posted November 21, 2017 That did it. I always have the trailing commas is why I didn't try it... oy thank you... Link to comment Share on other sites More sharing options...
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