I urge you to stop building SQL-Statements the way you did there:
- Column values as literals in SQL-Statements lead to errors like the one you experience here.
- Column values as literals in SQL-Statements open the door for SQL-Injection-Attacks.
- Concatenating SQL-Statements makes them hard to read and maintain. In your case above, near impossible.
Instead, use SQL-Parameters.
Simple Example here.[
^]
I would suggest you do that and if you then still get the same error, come back and ask again. But post the whole SQL-Statement then - the excerpt you're showing here doesn't allow for identifying the error.
edit:
I think the cause of the error is this: Identifiers (e.g. table or column names) in SQL-Statements for MySQL have to be quoted using "back-ticks":
`
Or, if the option ANSI_QUOTES is enabled, with double-quotes:
"
You're using the single-quote for the table name:
'
btechstudent_academics
'
So I think it should work with
`
btechstudent_academics
`
or if not, then with
"
btechstudent_academics
"
For further reading, see here:
Schema Object Names[
^]