What is the best way to create a simple rule based on a NULL recordset value?
I've always had trouble with this even when hand coding. I usually end up either putting in a default value in the database for comparison purposes, or create a recordset and perform the action depending on whether or not the recordset is empty. But I'd really like to do this, if possible the way the database is set up, and use the Rules manager.
I simply want to show the image is the recordset value for a particular field is not Null, and not show the image if the value is NULL.
When creating the Rule, I can either use Allow or Restrict. Which would e the best one and what would the comparison be to the recordset value?
I tried using Restrict, selected the recordset field, the Equals sign, and left the comparing field empty. This is what I do for Page access to check if the Sessions variable for a Logon ID is set and it works.
This time however, after the Rule is created, I select the Rule, and the image doesn't display although it should. I then tried selecting the "Not" version of the rule, and get an error
Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/content/65/9860265/html/Profile_Preview.php on line 126
So, is it just not a good idea to rely on null values for these things? Or is there a better way to create the rule? I do understand the difference between NULL and something that just doesn't contain any data.