-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
I'm a mysql user, and now i'm building a query with your class.
But it still getting error. I really don't understand what Arbitrary SQL is?
In mySQL or msSQL i can simply run a query like:
SELECT * FROM abc WHERE field='text'
I've tried it with your class but now an error occurred everytime.
let stmt = db!.prepare("SELECT COUNT(id) FROM dict WHERE word='?'")
try stmt.run(inp)
let count = stmt.scalar() as! Int64
I can't pass parameter (inp) in here.
What are .scalar , .prepare .run ??!
How to put parameter on it? And what if the input value has ' character?
Will it have sql injection?
Why you have to make it difficult to build an query?
Metadata
Metadata
Assignees
Labels
No labels