Skip to content

Commit 7e4a99c

Browse files
committed
simplify query
1 parent a64493d commit 7e4a99c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

LookupOrg.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ public async Task<IActionResult> RunAsync([HttpTrigger(AuthorizationLevel.Anonym
5252

5353
string sql =
5454
"select *, 1 as rowOrder from organizations where " +
55-
"MATCH (Organization) AGAINST (@term IN BOOLEAN MODE) " +
56-
"UNION " +
57-
"select *, 2 as rowOrder from organizations where " +
58-
"MATCH(Organization) AGAINST(concat(@term, '* -', @term) IN BOOLEAN MODE) " +
59-
"ORDER by rowOrder, Organization";
55+
"MATCH (Organization) AGAINST (@term IN BOOLEAN MODE); ";
56+
//"UNION " +
57+
//"select *, 2 as rowOrder from organizations where " +
58+
//"MATCH(Organization) AGAINST(concat(@term, '* -', @term) IN BOOLEAN MODE) " +
59+
//"ORDER by rowOrder, Organization";
6060

6161
using (var command = new MySqlCommand(sql, conn))
6262
{

0 commit comments

Comments
 (0)