ページの作成

ページの作成

親となるページを選択してください。

ページは必ず何かしらの親ページに紐づきます。
親ページに紐づくページを子ページといいます。
例: 親=スポーツ, 子1=サッカー, 子2=野球

子ページを親ページとして更に子ページを作成することも可能です。
例: 親=サッカー, 子=サッカーのルール

親ページはいつでも変更することが可能なのでとりあえず作ってみましょう!
テンプレートを更新

56. SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ~

エラー内容

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ~

 

発生条件/原因/対処法

前提:Laravel, MySQL

絵文字を入力した際に発生するエラー。

対応策は複数あるので以下に挙げるもの全てを確認すること。

 

1. テーブルの文字コード

「utf8mb4_general_ci」といったマルチバイト(mb4)になっていること。

※対象のカラムに対しての変更を行うこと。データ互換性云々は自己責任で。

 

2. Laravelの「config/database.php」の設定

        'mysql' => [
            'driver' => 'mysql',
            'url' => env('DATABASE_URL'),
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'unix_socket' => env('DB_SOCKET', ''),

            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_general_ci',

            'prefix' => '',
            'prefix_indexes' => true,
            'strict' => true,
            'engine' => null,
            'options' => extension_loaded('pdo_mysql') ? array_filter([
                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
            ]) : [],

上記のようにテーブルの文字コードと一致しているか確認。

一致していない場合は修正して以下のコマンドを実行。

php artisan config:clear

 

子ページ
子ページはありません
同階層のページ
  1. 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `~` add unique `~`(`~
  2. ERROR 1063 (42000): Incorrect column specifier for column '~'
  3. mysqld: Can't change dir to '...\MySQL\MySQL Server X.X\data\' (OS errno 2 - No such file or directory)
  4. Install/Remove of the Service Denied!
  5. Datetime型がNULLに見える
  6. Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
  7. ERROR 1698 (28000): Access denied for user 'root'@'localhost'
  8. Exception: Wrong MySQL configuration
  9. [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
  10. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
  11. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
  12. Incorrect column specifier for column 'カラム名'
  13. BLOB/TEXT column 'description' used in key specification without a key length
  14. ERROR: /bin/sh: mysql_config: コマンドが見つかりません
  15. Host ... is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
  16. CSVエクスポート時に「ERROR 1045 (28000): Access denied for user 'username'@'localhost' (using password: YES)」
  17. Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
  18. 1
  19. 1
  20. 1)
  21. 1
  22. 1
  23. 1
  24. 1
  25. 1
  26. 1
  27. 1
  28. 1
  29. 1
  30. 1
  31. 1
  32. 1
  33. 1"'`--
  34. 1
  35. 1
  36. 1
  37. 1
  38. 1
  39. 1
  40. 1
  41. 1
  42. 1
  43. 1)
  44. 1
  45. 1
  46. 1
  47. 1
  48. 1
  49. 1
  50. 1
  51. 1
  52. 1
  53. 1"'`--
  54. 1
  55. 1
  56. SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ~

最近の質問

コメント一覧

    No.100 | guest | 2023-01-28 12:05:59

    Dear itlibra.com admin, You always provide great information and insights.

    No.99 | guest | 2023-01-10 16:46:38

    Hello there there! This write-up couldn’t be composed any greater! Looking via this informative article reminds me of my earlier roommate! He constantly saved discussing this. I’ll mail this submit to him. Pretty sure he’ll have an excellent go through. Lots of many thanks for sharing!

    No.98 | guest | 2022-10-08 08:44:18

    bunadisisj nsjjsjsisjsmizjzjjzjzz zumzsert

    No.97 | guest | 2022-10-07 11:25:22

    bunadisisj nsjjsjsisjsmizjzjjzjzz zumzsert

    No.96 | guest | 2022-10-05 14:40:40

    bunadisisj nsjjsjsisjsmizjzjjzjzz zumzsert

    No.94 | guest | 2022-09-02 05:48:25

    bunadisisj nsjjsjsisjsmizjzjjzjzz zumzsert

    No.2 | guest | 2022-03-05 09:00:02

    Everything is very open with a very clear explanation of the challenges. It was definitely informative. Your site is very useful. Thanks for sharing! spirulin plus

    No.1 | guest | 2022-03-05 08:58:38

    Excellent goods from you, man. I've consider your stuff prior to and you're just too magnificent. I really like what you've bought here, certainly like what you are saying and the best way in which you say it. You are making it entertaining and you continue to take care of to keep it wise. I can't wait to read much more from you. That is actually a tremendous site. member xxl