/mysql-json-php-talk

Very simple examples of how to use MySQL JSON type with PHP

Primary LanguagePHP

Simple Demo of MySQL JSON for talk

Table schemas located in schema directory.

filljson.php shows that JSON value in database can't be bigger than max_allowed_packet.

invalid.php show that you can't insert invalid JSON string into JSON column.

select.php shows how data returned from JSON column.

selectmember.php shows how data returned from JSON column when you define what data to return from JSON object using JSON path.

withindex.php shows how to search data using generated column and index on generated column.

withindexdirect.php shows tat MySQL automatically selects proper index if you search by JSON object member that indexed.

withoutindex.php shows that search without indexing is still available, but slower.

utils/filldata.php generates data for index tests.