вот ошибка: бд есть значения но почему то не выводит. поменял значения вручную, запрос выдает значения во вью а в запросе пишет undefined. когда втавляю в typeof тоже пишет number
Error: ER_BAD_FIELD_ERROR: Unknown column 'undefined' in 'where clause'
at Query.Sequence._packetToError (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
at Query.ErrorPacket (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\protocol\sequences\Query.js:79:18)
at Protocol._parsePacket (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket.<anonymous> (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\Connection.js:88:28)
at Socket.<anonymous> (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
--------------------
at Protocol._enqueue (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Connection.query (C:\xampp\htdocs\mysite.local\node_modules\mysql\lib\Connection.js:198:25)
at C:\xampp\htdocs\mysite.local\app.js:161:13
at Layer.handle [as handle_request] (C:\xampp\htdocs\mysite.local\node_modules\express\lib\router\layer.js:95:5)
at next (C:\xampp\htdocs\mysite.local\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\xampp\htdocs\mysite.local\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\xampp\htdocs\mysite.local\node_modules\express\lib\router\layer.js:95:5)
at C:\xampp\htdocs\mysite.local\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\xampp\htdocs\mysite.local\node_modules\express\lib\router\index.js:335:12)
at next (C:\xampp\htdocs\mysite.local\node_modules\express\lib\router\index.js:275:10) {
code: 'ER_BAD_FIELD_ERROR',
errno: 1054,
sqlMessage: "Unknown column 'undefined' in 'where clause'",
sqlState: '42S22',
index: 0,
sql: 'SELECT `id`,`prod`,`name`,`description`,`photo`,`price`,`popularity`,`sale`,(`price` -`price` / 100 * `sale`) AS `tsale` FROM `smartphone` WHERE `price` >= undefined AND `price` <= undefined ORDER BY popularity ASC'
}