PHP

OData criteria encoding and "'Edm.Boolean' are not compatible" issues

Did some work today with an OData system. Making an number of mistakes along the way, everything seemed normal, until I got to the this error message:
- "The types 'Edm.Boolean' and 'Edm.String' are not compatible."

It seemed to persist almost no matter what. The solution if you're here banging your head against the wall is pretty simple, if frustrating.

Tags: 

Drupal 7 Services Example - PHP Curl

I had a need to consume a custom service I created in Drupal services. There's loads of tutorials on how to do that, feel free to google. But my previous code for using the api I created was for D6, a few things have changed. Looking around I found most examples were javascript, or using drupal's http library. I wrote a tiny little object just as a simple way to consume using curl for reference. It's not complete, but it lets you log in and out. You can take it from there to build what you need.

Tags: 

PHP Country Code ISO3 to ISO2 Mapping Array

Needed this for one my projects. Finding an ISO code 2 php array was immediate, but no one seems to have a 3 to 2 code mapping. Posting just to make people's googling more pleasant.

Tags: 

Parsing the LEIE Database (DBF file)

Had a client today that needed to parse the USA LEIE Database (List of Excluded Individuals and Entities). This is the database the government uses to excluded vendors from taking part in any federally funded healthcare program. You can download a copy of your own here: https://oig.hhs.gov/exclusions/exclusions_list.asp. Surprise, the file is in .DBF format! Here's how you ignore that issue.

Tags: 

Pages

Subscribe to RSS - PHP