Added sql<->php types conversions
added wrapper class to easily define custom functions