@JohnWilliams - you're looking to see if the query is returning a literal TRUE in your first if statement; that won't happen with a SELECT statement. Instead, you should be getting a result object, which will never resolve to TRUE
↧