Posts

Showing posts with the label mysql

*FIXED* QuickBooks Integration Error - EDGE-CR-ERR-8090 - Auth ID does not exist

Integration with QuickBooks is easy if you know the OAuth flow. QuickBooks uses the OAuth 1.0 specification. They provide libraries for PHP, Java and other popular languages. For ColdFusion/Railo, you can use the OAuth implementation from  http://oauth.riaforge.org/ .  Usually the error messages from QB are self-explanatory and are mostly related with Signature or the Access token/secret. This one particular error left us a bit embarrassed as there were no help available. But we quickly found it was a data issue.  The error while trying to retrieve data from QB is as follows:

Fixing error with MySQL "Headers and client library minor version mismatch."

With PHP and MySQL, if the MySQL is upgraded you may end up with this error on every request to the database from PHP. This error means the MySQL library in PHP is not compatible with the version of MySQL it is connecting to. So, the solution is that you have to upgrade your PHP version that is compatible with the MySQL client library version. There is another method (not tested) for resolving this issue. Pull the mysqli.so file from a server with PHP compiled with MySQL 5.5 and replace it in the /usr/lib/php5/ directory. Now it should be able to connect to the MySQL.

Rename Database in MySQL

MySQL had supported renaming Database in some earlier versions, but due to some security issues it was removed. So, if you create a Database, you do not have a command to directly rename it. There is a workaround though so that you need not create and populate all the tables to the new database.

MySQL default value to integer fields with LOAD DATA from CSV file import with dynamic fields

I was confronted with a problem while loading data from file to the MySQL table. The table have some Integer and Varchar fields and the data is loaded from CSV. Normally the data loading process goes well, but in case the data does not exist for a Integer field, the import breaks and show error like :  Incorrect integer value: '' for column 'ID' at row 1 The fields are dynamic that I can determine the fields in run-time only.  So, I devised a solution for this. I have created the query such that for all the fields with Integer type, I add a '0' with it.  Here are the steps.