Get JSON from mysql result
-
Hello,
i’m using this line of code->$result = $wpdb->get_results("SELECT * FROM Table1");
and its returning this{ "status": "ok", "count": 1, "result": [ { "id": "1", "field1": "Name" } ] } but i want it to return like this { "status": "ok", "count": 1, "result": [ { "id": "1", "field1": "Team", "Player": [ { "other_table_id": "1", "other_table_name1": "PlayerName", } ] } ] }
is this possible using wordpress?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Get JSON from mysql result’ is closed to new replies.