The SQL helper functions have been deprecated now. However we have published new and more extensive documentation that explains how to work with the current database library in WHMCS and this can be found @ http://docs.whmcs.com/Interacting_With_The_Database