Skip to content

Commit e9b5627

Browse files
committed
use ? for param
1 parent e1746a8 commit e9b5627

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LookupOrg.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ 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); ";
55+
"MATCH (Organization) AGAINST (?term IN BOOLEAN MODE); ";
5656
//"UNION " +
5757
//"select *, 2 as rowOrder from organizations where " +
5858
//"MATCH(Organization) AGAINST(concat(@term, '* -', @term) IN BOOLEAN MODE) " +
5959
//"ORDER by rowOrder, Organization";
6060

6161
using (var command = new MySqlCommand(sql, conn))
6262
{
63-
command.Parameters.AddWithValue("@term", term);
63+
command.Parameters.AddWithValue("term", term);
6464

6565
Console.WriteLine("Execute command");
6666

0 commit comments

Comments
 (0)