None of above examples works for me :-/
I'm trying to get all the movies which "youtube_id" field is empty (in fact I want to get all movies which youtube_id is not empty, but also != selector doesn't work for me and as I can see it's not implemented here https://github.com/r...ectFulltext.php while it exists in documentation, so I will stick to get all pages with empty youtube_id fields).
So what I'm doing is :
$movies = $pages->get('/'.$lang.'/movies')->find('youtube_id=, limit=10');
or
$movies = $pages->get('/'.$lang.'/movies')->find('youtube_id=0, limit=10');
etc.
That's the SQL query that shows up in debug mode :
SELECT SQL_CALC_FOUND_ROWS pages.id,pages.templates_id FROM `pages` JOIN pages_parents ON (pages_parents.pages_id=pages.parent_id AND (pages_parents.parents_id=1723 OR pages_parents.pages_id=1723 )) LEFT JOIN field_youtube_id ON field_youtube_id.pages_id=pages.id WHERE field_youtube_id.pages_id IS NULL AND (pages.status<1024) GROUP BY pages.id LIMIT 0,10 /* Selector: has_parent=1723, youtube_id=0, limit=10, status<1024 */ [0 rows] [0.0004s, 0.0836s, 0.21818995475769s]
Also I've checked in database and this field is really empty. Type of this field is just "Text". I'm using processwire 2.1