Subscribe For Free Updates!

We'll not spam mate! We promise.

Monday, November 4, 2013

MySQL Conversion Class (Database Abstractions)



MySQL Conversion Class



  • easy way to Import/Export MySQL Data;
  • easy way to create API;

  • get result of MySQL query as XML, JSON or associative array;

  • print result (with headers) of MySQL query as XML, JSON or associative array;

  • insert, update or delete data on MySQL table using XML, JSON or associative array;

  • support MySQL and MySQLi driver;

  • the JSON created can be indented or not, you choose;

  • easy to get class-failure errors;

  • examples of both functions are included.


Example


Get JSON data from MySQL query ($query)

DB::init($params)->query($query)->as_json(true);


Insert JSON data into MySQL table

DB::init($params)->from_json($data)->insert('test');


For more examlpes please read description.


Changelog



VERSION 1.1



  • Added method update($table,$where)

  • Added method delete($table,$where)




VERSION 1.0



  • Released

No comments:

Post a Comment