简体   繁体   中英

Unrecognized keyword and Unexpected token error in MYSQL

I am getting an error on Mysql query. Here I am trying to get data using INNER JOIN. Can anybody suggest what is the Unexpected token error. Here is my query

SELECT COUNT(t3.id) FROM pdf_notes t3, users t1
INNER JOIN form_details t2
ON t1.uname = t2.user_id
WHERE t3.ref_id = t2.pon_id
AND t3.type = t2.type as 'count_notes';

I am getting Unrecognized keyword error near AS and Unexpected Token error near count_notes.

And even if I change the last line from AND t3.type = t2.type as 'count_notes' to AND t3.type=t2.type count_notes it still shows me syntax error syntax error near 'count_notes LIMIT 0, 25' .

Can anybody suggest me as to what's my mistake.

I am getting an error on Mysql query. Here I am trying to get data using INNER JOIN. Can anybody suggest what is the Unexpected token error. Here is my query

SELECT COUNT(t3.id) FROM pdf_notes t3, users t1
INNER JOIN form_details t2
ON t1.uname = t2.user_id
WHERE t3.ref_id = t2.pon_id
AND t3.type = t2.type as 'count_notes';

I am getting Unrecognized keyword error near AS and Unexpected Token error near count_notes.

And even if I change the last line from AND t3.type = t2.type as 'count_notes' to AND t3.type=t2.type count_notes it still shows me syntax error syntax error near 'count_notes LIMIT 0, 25' .

Can anybody suggest me as to what's my mistake.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM