0

私はexpress.jsで非常に単純なサインアップフォームを開発しましたが、リダイレクトして値を送信すると、expressは次のエラーを表示します

500 TypeError: Object # has no method 'query'

at /home/nodes/Documents/Aptana Studio 3 Workspace/mysql/routes/index.js:79:8
at callbacks (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:272:11)
at param (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:246:11)
at pass (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:253:5)
at Router._dispatch (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:280:4)
at Object.handle (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:45:10)
at next (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/http.js:204:15)
at /home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/middleware/session.js:322:9
at /home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/middleware/session.js:337:9
at Array.0 (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/middleware/session/memory.js:57:7)</code>

私のコードはここ から見ることができます
ありがとう

4

1 に答える 1

0

クエリを実行するときclientはなく 、 object を使用する必要があります。mysql

于 2012-06-17T15:41:03.100 に答える