KNEX/Node, raw SQL
KNEX/Node, raw SQL
I'm reading the docs, and it says that .where() is available, and I've successfully used it!
I tried to chain some of the other KNEX mehtods, like .orderBy(), but that is not available on the editor instance.
It is, however, available when chained onto db .... db.orderBy().
Can I execute raw SQL into something that Editor can handle? In the PHP examples, it looks like you can, but how do I do that in NODE/KNEX?
let editor = new Editor(db, 'OnboardingAppointments', 'ProcessingID')
.readTable('vueOA_Admin_Attendance')
.fields(...)
.where(
{'StartDate': targetDate}
);
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Use the
Editor.where()method with a function to get access to the Knex object - e.g.:More documentation on that available here.
Allan