Skip to content

Instantly share code, notes, and snippets.

@rfay
Created January 16, 2016 21:48
Show Gist options
  • Save rfay/f54f0e28441e4fb9dd57 to your computer and use it in GitHub Desktop.
Save rfay/f54f0e28441e4fb9dd57 to your computer and use it in GitHub Desktop.
$cat_query = "
SELECT tct.CategoryType, tc.CategoryDescription
FROM TSL_User_Categories tuc
LEFT JOIN TSL_Categories tc ON tc.CategoryId=tuc.CategoryId
LEFT JOIN TSL_CategoryTypes tct ON tc.CategoryTypeId=tct.CategoryTypeId
WHERE tuc.SubscriberId=" . $row->SubscriberID;
try {
$result = mssql_query($cat_query);
while($row = mssql_fetch_assoc($result)) {
$x = 1;
}
mssql_free_result($result);
} catch (Exception $e) {
// Ignore as this seems to be empty result?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment