❔ SQL syntax error - INSERT INTO statement
query looks like this
get a syntax error
please keep in mind this is something for school, stuff like SQL Injections and other new features are dismissible
thanks in advance, benAmi
12 Replies
!eval
That command had an error
BadArgCount: The input text has too few parameters.
Remove your reaction to delete this message
benAmi#6360
REPL Result: Failure
Exception: CompilationErrorException
Compile: 522.125ms | Execution: 0.000ms | React with ❌ to remove this embed.
!eval
That command had an error
BadArgCount: The input text has too few parameters.
Remove your reaction to delete this message
benAmi#6360
REPL Result: Failure
Exception: CompilationErrorException
Compile: 672.142ms | Execution: 0.000ms | React with ❌ to remove this embed.
benAmi#6360
REPL Result: Failure
Exception: CompilationErrorException
Compile: 712.386ms | Execution: 0.000ms | React with ❌ to remove this embed.
benAmi#6360
REPL Result: Success
Console Output
Compile: 607.958ms | Execution: 83.025ms | React with ❌ to remove this embed.
Any help please?
Strings in SQL need to be quoted
So it has to be
'Moshe'
not Moshe
And so on
Prepared statements will take care of that for youNot only quoted, but also escaped to prevent SQL injection, bezt way to do that is by using Prepared statement as was mentioned before
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.