dhtmlxConnector with Mysqli is not working

I am currently starting to use the dhtmlxConnector, but always encounter problems, does anyone could help me out?

My html code is:

The php Code is:

<?php //include ("c:\windows\include\db_connect_mmc.inc"); $res = mysqli_connect("localhost","root","cincin87","memorymapcomposer"); require("../../codebase/grid_connector.php"); require("../../codebase/db_mysqli.php"); $grid = new GridConnector($res,"MySQLi"); $grid->dynamic_loading(100); $grid->render_table("Product_Index_Table"); ?>

Then there are a bunch of errors came out. Do you know what’s wrong with these codes?
Thank you very much…

Hi,
could you provide error details?
Make sure that your php configuration enables using MySQLi extension.

Hi radyno,

Thank you very much for helping me.
The error are:
"

Warning:implode()[function.implode’:Invalid argument passed in
C:WebApp\MMC\Create\dhmltxConnector\php\codebase\base_connector.php on line360

Fatal error:Uncaught exception ‘Exception’ with message ‘MySQL operation failed You have an error in your SQL syntax; check the manual that correponds to your MySQL server version for the right syntax to use near ‘FROM Product_Index_Table LIMIT 0,100’ at line 1’ in
C:\WebApp\MMC\Create\dhtmlxConnector\php\codebase\db_mysqli.php:13
Stack trace:
#0 C:\WebApp…\db_common.php(631):MySQLiDBDataWrapper->query(‘SELECT FROM Pr…’)
#1 C:\WebApp…\base_connector.php(434):DBDataWrapper->select(Object(DataRequestConfig))
#2 C:\WebApp…\base_connector(354):Connector->render()
#3 C:\WebApp…\samples\grid\test.php(10):Connector->render_table(‘Product_Index_T…’)
#4 {main} thrown inC:\WebApp…db_mysqli.phpon line13"

Besides, i set my php.ini to “extension=php_mysqli.dll”, is this what you mean to enable Mysqli?

Thank you very much…

You need to list the fields, which you want to see in the grid, something like next

$grid->render_table("Product_Index_Table", "id_field", "fieldA,fieldB,fieldC");

Hi Stanislav,

I see, this is the problem... Thank you very much for helping me..

Hi,

May i also know how to use the dataprocessor to get the updated row value, and save it to the database. There are some function introduced for the tutorial. But what is the exactly the steps in both client side and server side to update the changes on server database?

Thanks.

Hi,

Now i can load the contents from the database table after i correct my $grid->render_table(“Product_Index_Table”, “id_field”, “fieldA,fieldB,fieldC”) function.

But when i try to delete the row, or edit a row, the deleted rows not removed from the grid, and also the updated rows still stay bold? Could you help me with that? I read the Guide, it said that we need to send back a XML file to client side, how is that achieving?

Thank you very much for helping me1…

Basically the next two lines is all that you need

var dp = new dataProcessor("test.php"); dp.init(mygrid);

Its mean some error occurs during update operation, which result in incorrect xml response from server side.

Try to enable the server side log, and check its content for the problematic case

$grid->enable_log("some.txt"); $grid->render_table(...

Hi Stanislav,

Thank you very much for your help, Have good one…