Called 'db_res' function with erroneous argument #0.
I have one of these errors with importing Facebook events.
This is causing error;
if (db_res($sql)) {
$sqlQuery = "SELECT `bx_events_main`.`ID` FROM bx_events_main WHERE `bx_events_main`.`ResponsibleID` = '{$iProfileId}' ORDER BY `bx_events_main`.`Date` DESC LIMIT 1";