Jump to content

You might know but I just learnt that spaces matter in a find


alan
 Share

Recommended Posts

Now I look at this I see it makes sense, as we're allowed to simply type the name of a field to use it rather than some "Field = my_field" syntax (lovely PW :)) I can see that whitespace could be weird to deal with so it makes sense that it must not be used; to explain this produced an error:

$slideshow = $pages->find( "parent=/work/, slideshow_part_of=1, image_special.count>0, slideshow_copy != ''" );

but this was perfect

$slideshow = $pages->find( "parent=/work/, slideshow_part_of=1, image_special.count>0, slideshow_copy!=''" );

the difference being the spaces either side of the != in the final test.

I am guessing this is stated in the documentation or obvious or something a PHP person would know and that's how I missed it (not great at RTFM, not great at seeing obvious things and not a PHP hero ;))

Anyway, I just thought I post this in case it helps anyone else out fitting the above description.

Totally loving the speed and power of working with PW.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...