mysqljs / mysql

A pure node.js JavaScript Client implementing the MySQL protocol.
MIT License
18.22k stars 2.53k forks source link

dont work with fulltext and order by #2501

Closed czewail closed 3 years ago

czewail commented 3 years ago
select id, (MATCH(tags) AGAINST ('word')) as score 
from photos where MATCH(tags) AGAINST ('word') 
order by score desc limit 9

throws Error: ER_BAD_FIELD_ERROR: Unknown column 'score' in 'order clause'

but works with mysql client:

image
sidorares commented 3 years ago

can you show whats in the fields response for select * from photos query? as in connection.query(select * from photos, (err, rows, fields) => console.log(fields))