B
B
BonBon Slick2016-11-09 11:46:29
PHP
BonBon Slick, 2016-11-09 11:46:29

SQLSTATE[22032]:: 3140 Invalid JSON text: "Invalid value." json input field?

I have 2 fields:

<div class="form-group">
  Color:<input type="text" name="color"  class="form-control"  value="{{ old('color') }}">
</div>
<div class="form-group">
  Tags:<input type="text" name="tags"  class="form-control" value="{{ old('tags') }}">
</div>

In the Data Base they are marked as type - json .
When adding, I try to separate them with commas or like this [qwe,asd] / ['qwe', 'asd']/ 'qwe', 'asd' .
Gives an error message:
SQLSTATE[22032]: <<Unknown error>>: 3140 Invalid JSON text: "Invalid value." at position 0 in value for column 'products.color'....

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question