私はデータベースを必要とするアプリケーションを持っています。 私はnone
に「pskinsurl」のデータベース行を設定し、私はこのエラーを取得:SQL Strangeエラーデフォルト値
[2017-11-02 18:06:58.514] [ERROR] [default] - Strange error
[2017-11-02 18:06:58.515] [ERROR] [default] - { Error: ER_NO_DEFAULT_FOR_FIELD: Field 'pskinsurl' doesn't have a default value
at Query.Sequence._packetToError (/var/www/Bot/node_modules/mysql/lib/protoc ol/sequences/Sequence.js:52:14)
at Query.ErrorPacket (/var/www/Bot/node_modules/mysql/lib/protocol/sequences /Query.js:77:18)
at Protocol._parsePacket (/var/www/Bot/node_modules/mysql/lib/protocol/Proto col.js:279:23)
at Parser.write (/var/www/Bot/node_modules/mysql/lib/protocol/Parser.js:76:1 2)
at Protocol.write (/var/www/Bot/node_modules/mysql/lib/protocol/Protocol.js: 39:16)
at Socket.<anonymous> (/var/www/Bot/node_modules/mysql/lib/Connection.js:103 :28)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
--------------------
at Protocol._enqueue (/var/www/Bot/node_modules/mysql/lib/protocol/Protocol. js:145:48)
at Connection.query (/var/www/Bot/node_modules/mysql/lib/Connection.js:208:2 5)
at Query._callback (/var/www/Bot/cf.js:3293:26)
at Query.Sequence.end (/var/www/Bot/node_modules/mysql/lib/protocol/sequence s/Sequence.js:88:24)
at Query._handleFinalResultPacket (/var/www/Bot/node_modules/mysql/lib/proto col/sequences/Query.js:139:8)
at Query.EofPacket (/var/www/Bot/node_modules/mysql/lib/protocol/sequences/Q uery.js:123:8)
at Protocol._parsePacket (/var/www/Bot/node_modules/mysql/lib/protocol/Proto col.js:279:23)
at Parser.write (/var/www/Bot/node_modules/mysql/lib/protocol/Parser.js:76:1 2)
at Protocol.write (/var/www/Bot/node_modules/mysql/lib/protocol/Protocol.js: 39:16)
at Socket.<anonymous> (/var/www/Bot/node_modules/mysql/lib/Connection.js:103 :28)
code: 'ER_NO_DEFAULT_FOR_FIELD',
errno: 1364,
sqlMessage: 'Field \'pskinsurl\' doesn\'t have a default value',
sqlState: 'HY000',
index: 0,
sql: 'INSERT INTO games SET expire = 1509662218, cassetids = \'12530890030\', csteamid = \'76561198114317007\', cname = \'KnottyCord\', cavatar = \'https://st eamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/1d/1d3f34eee812968fd5 548f36ee281265373ddf91_full.jpg\', cskinsurl = \'-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWw KGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXU5A1PIYQNqhpOSV-fRPasw8rsVFx5KAVo5PSkKV4xhfG fKTgVvIXlxNPSwaOmMLiGwzgJvJMniO-Zoo_z2wXg-EVvfSmtc78HsNoy\', cskinsnames = \'Gam ma 2 Case\', cskinsprices = \'0.03\', cskins = 1, ctp = 0.03, cpick = \'t\', tcr eated = 1509660418.494, hash = \'adb9037cfd700a24544d4d774189a223\', bot = \'bot 1\'' }
「0を定義したように」私は値で、このエラーを取得する しかし、私はNULL
に設定した場合、私はこのエラーを取得しますGoogleのデベロッパーConsole
に:
Uncaught TypeError: Cannot read property 'split' of null
at onMessage (app.js?v1509661538:353)
at r.<anonymous> (app.js?v1509661538:1280)
at r.emit (socket.io-1.4.5.js:sourcemap:1)
at r.onevent (socket.io-1.4.5.js:sourcemap:2)
at r.onpacket (socket.io-1.4.5.js:sourcemap:2)
at r.<anonymous> (socket.io-1.4.5.js:sourcemap:2)
at r.emit (socket.io-1.4.5.js:sourcemap:1)
at r.ondecoded (socket.io-1.4.5.js:sourcemap:1)
at s.<anonymous> (socket.io-1.4.5.js:sourcemap:2)
at s.r.emit (socket.io-1.4.5.js:sourcemap:1)
どのDBMSについて話していますか、どのプログラミング言語ですか? –
私はそれがjavaまたはノードjsだと思って、データベースはphpmyadminで管理されています – KnottyCord
あなたは何か考えていますか? @marc_s – KnottyCord