randyinla Posted November 5, 2015 Posted November 5, 2015 Hi, I have several fields I'd like to sort that are empty, like Email. Here are 2 snippets of code that are not returning results: $RandyFind->addFindCriterion("Email", ''); or $RandyFind->addFindCriterion("Email", "=="); Any thoughts? Also, is there a way to force null into a field when editing? Thanks a Bunch!!
webko Posted November 5, 2015 Posted November 5, 2015 Those are Find criteria, not Sort criteria, so I'm confused... And blank is a valid editing value, so editing a field in a web form to be blank should then be reflected in the database when the edit is performed Webko
doughemi Posted November 5, 2015 Posted November 5, 2015 The correct syntax for finding an empty field is $RandyFind->addFindCriterion("Email", "=");//one equal sign, not two Another thing to try is to find anything ('*') in the field and then omit found records. See this thread for one gotcha in this method.
randyinla Posted November 8, 2015 Author Posted November 8, 2015 Thanks Doug and Webko, coding works great. Can you recommend a good PHP book or links on the web for filemaker and PHP?
doughemi Posted November 8, 2015 Posted November 8, 2015 FileMaker API for PHP 13 by Todd Duell - ISBN 978-0692309766 http://www.amazon.com/s/ref=nb_sb_ss_i_1_18?url=search-alias%3Daps&field-keywords=filemaker+api+for+php+13&sprefix=Filemaker+API+for+%2Caps%2C144 PHP For the Web (Visual Quickstart Guide) by Larry Ullman - ISBN 078-5342733457 http://www.amazon.com/PHP-Web-Visual-QuickStart-Guide/dp/0321733452/ref=sr_1_1?ie=UTF8&qid=1446990550&sr=8-1&keywords=php+for+the+web+visual+quickstart+guide+4th+edition
Recommended Posts
This topic is 3559 days old. Please don't post here. Open a new topic instead.
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