I am trying to execute and return results from the below statement:
$sqlQuery = new SQLQuery();
$sqlQuery->setFrom('ListingCategory_Listings');
$sqlQuery->selectField('*');
$sqlQuery->addLeftJoin('Listing', '"ListingCategory_Listings"."ListingID" = "Listing"."ID"');
$sqlQuery->addLeftJoin('SiteTree_Live', '"Listing"."ID" = "SiteTree_Live"."ID"');
$sqlQuery->addLeftJoin('ListingCategory', '"ListingCategory_Listings"."ListingCategoryID" = "ListingCategory"."ID"');
$sqlQuery->addLeftJoin('File', '"ListingCategory"."IconID" = "File"."ID"');
$rawSQL = $sqlQuery->sql();
return $rawSQL->execute();
When I output the SQL to my template and run the query through phpmyadmin, results are returned, however I am getting an error "Fatal error: Call to a member function execute() on a non-object" what am I doing wrong here?