$ SQL & quot; select * alias {$ studentid} andlikeclassid {$ classid} & quot; PS: likeclassid is a complete field name YouhaveanerrorinyourSQLsyntax; alias... $ SQL = "select * from student where studentid = {$ studentid} and likeclassid = {$ classid }";
PS: likeclassid is a complete field name
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and likeclassid = 1176' at line 1
Reply content:
$ SQL = "select * from student where studentid = {$ studentid} and likeclassid = {$ classid }";
PS: likeclassid is a complete field name
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and likeclassid = 1176' at line 1
Remove the braces and the matching format with few spaces after the like is incorrect.
The syntax should be classid like {$ classid}
But since it is like, fuzzy match is required, depending on the content you want to match using % ,*.