测试包中缺失了了数据库操作类mysql.php;

测试包中缺失了了数据库操作类mysql.php;

v10258v10258 Posts: 8Questions: 0Answers: 0
edited September 2012 in Bug reports
您好,1.9.3测试包中少了数据库操作类mysql.php;
examples/server_side/scripts文件夹中的php页面引入了此类
原代码:
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php"

Replies

  • v10258v10258 Posts: 8Questions: 0Answers: 0
    Hello, database operation class mysql.php 1.9.3 test package less;
    examples / server_side / scripts folder in php page to introduce such
    Original code:
    include ($ _SERVER ['DOCUMENT_ROOT']. "/ datatables / mysql.php"
  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    The code has a comment which says:

    > REMOVE THIS LINE (it just includes my SQL connection user/pass)

    So just remove it :-)

    Allan
  • v10258v10258 Posts: 8Questions: 0Answers: 0
    oh I'm sorry;
    This seems to not work;
    about the post.html--post.php
    $(document).ready(function() {
    $('#example').dataTable( {
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "scripts/post.php",
    "sServerMethod": "POST"
    } );
    } );
    <?php
    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    * Easy set variables
    */

    /* Array of database columns which should be read and sent back to DataTables. Use a space where
    * you want to insert a non-database field (for example a counter or static image)
    */
    $aColumns = array( 'engine', 'browser', 'platform', 'version', 'grade' );

    /* Indexed column (used for fast and accurate table cardinality) */
    $sIndexColumn = "id";

    /* DB table to use */
    $sTable = "ajax";

    /* Database connection information */
    $gaSql['user'] = "root";
    $gaSql['password'] = "";
    $gaSql['db'] = "datatable";
    $gaSql['server'] = "localhost";

    /* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
    //include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
  • v10258v10258 Posts: 8Questions: 0Answers: 0
    It's tell me:MySql Error:1054
  • v10258v10258 Posts: 8Questions: 0Answers: 0
    Oh,I'm sorry.
    I made a low-level error.
    In my mysql the primary key is 'Uid'.
    Thank you for your answer.
This discussion has been closed.