From Ape Wiki

Jump to: navigation, search

[edit] Problem with MySAC?

This is the wierdest thing I've ever seen, but any fields of type INT (SMALLINT,BIGINT, etc.) aren't recognized by (my copy of) mysac. MySAC is the library that merges MySQL support to SpiderMonkey.

What this means is you might get CHAR data, say first_name or last_name, but customer_id will be NULL as far as APE is concerned.

What I did to get around this was typecase the field using an SQL statement thusly:

select CAST(customer_id as CHAR(10)) as customer_id from ..."

Now the number comes through as a string and since JavaScript is loosely typed anyway, everything works well.

Hope this helps someone else! -mojoe