Friday, May 29, 2015

How to create JSON using data from MySQL database



How to create JSON using data from MySQL database


JSON (JavaScript Object Notation) is more preferred nowadays over XML as it’s lightweight, readable and easily manageable for exchanging data across various platforms.
we’ll see how JSON Data can be created from Employee table stored in MySQL database.

1. Create Employee table in MySQL database.



Create PHP file to read MySQL table and create JSON.get_json.php

DONE



*************************************************************************
 More Advance
If you want to create a API which Provide data on pass parameter then you can use following code:

The following code used in for parameter pass for geting data in json format

http://localhost/test_more_advance.php?no=10

 



10 comments:

  1. This post is from 2015. Why are you using mysqli? mysql was deprecated long ago.

    ReplyDelete
  2. this is a basic understanding for newbie who started programming in PHP in our new post we will post PDO and mysqli

    ReplyDelete
  3. My friend Suggest me this blog and I can say this is the best blog to get the basic knowledge.Thank you so much for this Selenium Training in Chennai

    ReplyDelete
  4. Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog on SAP MM.SAP MM

    ReplyDelete
  5. SAP MM,SD, real Time Training in Chennai
    We provides Best SAP MM,SD Training in Chennai wih real time project assistance by our leading Materail Management Consultant.
    For Free Live Demo @ Call to 8122241286.
    www.thecreatingexperts.com
    SAP MM
    SAP SD

    ReplyDelete
  6. This site is help full for every person and easily get money through bitcoin atm card . Please visit this site for bitcoin atm card ranking.you can change any money into another currency in any where in the world.

    ReplyDelete
  7. There is no better idea of keeping your mobile loaded with balance all the time. If you are also looking for any useful way to utilize your top up phone with bitcoin then hurry up and avail our service as much as can. There is no limit of it. Make your mobile life happier with balance recharge through NETELL.NET. COME SOON .THANK YOU .

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...