https://github.com/fadilxcoder/json-db
JSON column & settings in database
https://github.com/fadilxcoder/json-db
database json notes php poc sql
Last synced: about 1 year ago
JSON representation
JSON column & settings in database
- Host: GitHub
- URL: https://github.com/fadilxcoder/json-db
- Owner: fadilxcoder
- Created: 2020-06-15T18:59:27.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-14T19:33:50.000Z (over 3 years ago)
- Last Synced: 2025-01-04T19:23:44.956Z (over 1 year ago)
- Topics: database, json, notes, php, poc, sql
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NOTES
- Database `configuration` table is of type `json`
```
id config_name configuration
1 WEBSITE_CONFIGS {"allow": true, "version": 7, "language": "fr"}
2 WEBSITE_CONFIGS {"name": "fadil xcoder", "unit": 786, "language": "php", "nato_phonetic": "Foxtrot Alfa Delta India …
```
**Quering within JSON in table data**
```sql
SELECT `configuration`->>'$.nato_phonetic' AS phonetic_code
FROM `json_configs`
WHERE `configuration`->>'$.unit' = 786
```
**Response**
```json
{
HTTP: 200,
allow: true,
version: true,
language: "fr",
Code: "Foxtrot Alfa Delta India Lima"
}
```