预览 MySQL Conversion Class 等待分享

MySQL Conversion Classeasy way to Import/Export MySQL Data;easy way to create API; get result of MyS

标签:
  1. 0daydown
    [​IMG]
    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
    • Add method update($table,$where)
    • Add method delete($table,$where)
    Version 1.0
    • Released