Jump to content

This topic is 7501 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

OK here's an annoying problem for me to get through.

I've been using PHP with filemaker for a few months now - basically just including data via a URL.

include("http://.../FMPro?-DB=TEST...");  

But I've come across a problem. I'm trying to do a search, to only return a subset of the records of the database.

Using the above method works fine when I'm doing a -FindAll but as soon as I use -Find it seems to break down.

When I view the source of the resulting page, nothing is returned.

No javascript errors generated by the Web Companion

No PHP errors

All other PHP code on that page, both before and after that include() statement works fine.

When I try typing the include() value into the address bar, it works perfectly - returning only the subset of records I want.

I'm trying

http://www.domain.com:591/FMPro?-DB=TEST&-Format=test.html&-Error=error.html&TEST FIELD=UK&-Op=cn&-Max=20000&-Skip=0&-Find

Which when I type it into the address bar I get the UK records returned - however I get nothing when I try and include that address through PHP.

Any ideas?

If I can't get this to work I might have to can this way of doing things.

Thanks

Posted

Do you have any Spaces in the URL? If so you may have to use %20. I haven't had this problem, so I am only guessing.

Try modifying your URL a bit to see what happens. Try:

include("http://www.domain.com:591/FMPro?-db-TEST&-format=test.html&testfield=UK&-find");

You can check what search criteria was actually submitted to FM by going to "Modify Search" in the "Records" menu after the failed search.

Good Luck.

Garry

p.s. Try an extra "&", e.g. &-find&

Posted

Guess what, I do have spaces in the field name!!!

Also, I had this problem a few months ago when I was just starting PHP - took me ages to figure it out.

I didn't even think this was a problem with my PHP code - stupid me!!

That's solved it - thanks for the quick help.

This topic is 7501 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.