Fix for MySql array paramters.

MySql doesn't seem to work with Array parameters. So instead we create
a parameter per array index and pass in the array objects.

We also change to the constants true and false if we have an empty
array as MySql doesn't support empty arrays.