Link to home
Start Free TrialLog in
Avatar of Cruizectrl

asked on

Filemaker ODBC & PHP - no data in varchar

Hey Spiceheads.

Need help trying to pull ODBC data into a php app we're building.

We're running into the issue where the varchar(1000000) is displaying empty results.  We're able to successfully pull other fields like decimal and timestamps.

I read that there is a work around by checking the "Describe text fields at long varchar" option, but we still cant get any data to display.

We've also tried to change the max characters allowed in the database to 10 and that still doesn't do it.

I'm assuming it's something simple.
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Have you tried defining the fields as "text" as shown on page 58 of this reference?
Avatar of Cruizectrl


Hi Ray,

The problem fields are text fields.  We're using a query tool to play around with and by default it is a varchar (1000000, NULL) which is expected and doesn't read (I'm guessing because of a field limit in php.

We've changed it to varchar (10, NOT NULL) and still nothing.

Decimals and timestamps work fine (we're currently using decimals to pass data and case to display a "STATUS" field.).

We know that the query runs fine because we able to use a WHERE statement on a varchar column.
I don't think PHP "knows" anything about field definitions in a database -- it's just a pipe for information to and from the DB server.  Unfortunately, I can't do much more than read the docs; I don't have filemaker available to me any more.  Suggest you leave the question open for a while and let's see if someone else can come up with an idea.
Avatar of Andrew Angell
Andrew Angell
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Andrew.

I didn't realize how much of a pain it would be.

We've actually had some success's with using CAST on all our varchar columns.  I just started reading through on CWP and that sounds like another viable options too.  I kind steered past it because IWP  was not very good.  We'll take a look at the MYSQL option as well since all of our other data pulls from this source without a hitch.

Thanks for your feedback.