Simple PHP database library using JSON