Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL : error in your SQL syntax | LIMIT 0, 25

Tags:

mysql

I dont understand this error, guys please help me. why I am getting this error.. Is there something wrong in my query?

this is the error..

#1064 - 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 'LIMIT 0, 25' at line 7

and this is my query:

SELECT
    equivalent
FROM
    tb_student_record
INNER JOIN
    tb_student ON tb_student_record.stud_id = tb_student.stud_id 
WHERE
    tb_student_record.instructor_id = 'INST-20131296' 
    AND tb_student_record.criteria_id = '1' 
    AND tb_student_record.class_record_id = '1' 
    AND (CONCAT(stud_fname, ' ', stud_lname) = 'Jeffrey Oliveras' 
    AND tb_student_record.term = 'Prelim'

1 Answers

you are missing closing paranthesis at concat function

SELECT equivalent FROM tb_student_record INNER JOIN tb_student ON tb_student_record.stud_id=tb_student.stud_id 
WHERE tb_student_record.instructor_id = 'INST-20131296' 
AND tb_student_record.criteria_id = '1' 
AND tb_student_record.class_record_id = '1' 
AND (CONCAT(stud_fname, ' ', stud_lname) = 'Jeffrey Oliveras' )
AND tb_student_record.term = 'Prelim'
like image 92
Ankit Agrawal Avatar answered Sep 16 '25 12:09

Ankit Agrawal