I would be using the phpgrid on one web site that may have several different sections displaying data from different tables and databases. Let's assume I have the registered version (but right now I have the free version right at the moment).
Here is how I was thinking of installing phpgrid:
Module #1 of my app:
Module #2 of my app:
In this case lets say then that I want two different grids with different tables.
What files would I have in each module (folder) I am pretty sureit would be at least the one PHP file with the phpgrid properties?
would I have a separate config.php in each folder that points to the phpgrid and indicate the different table/view for each grid?
Thank you so much for the help!
What you will need is:
1) Place 'lib' folder and config.php in wwwphpgrid
2) In module1, create a grid php file e.g. grid1.php
2) In module2, create a grid php file e.g. grid2.php
In both files, you will include config.php and lib/inc/jqgrid_dist.php files, as http://www.phpgrid.org/demo/demos/editing/index.phps
And set different table config inside grid1.php and grid2.php
Hope it help.
Abu. For reference right now phpgrid is in folder "phpgrid-org" on my local Apache server. The demo version works just fine. I used the file you indicated,, "index.php" and changed the following lines to match those of the griddemo for now. The password is the same although it doesn't show here.
// Database config file to be passed in phpgrid constructor
$db_conf = array(
"mysql" => PHPGRID_DBTYPE,
"localhost" => PHPGRID_DBHOST,
"DBUser" => PHPGRID_DBUSER,
"" => PHPGRID_DBPASS,
"griddemo" => PHPGRID_DBNAME
$g = new jqgrid($db_conf);
And again the remainder of index.php hasn't changed and I call this file "grid1.php" for now. I am getting the error:
ADONewConnection: Unable to load database driver ''
My location on my server for grid1.php is "/recipedirectory/catalog/grid1.php"
I can't seam to see an error, although, there must be one. What am I missing? Thank you!
Correct $db_conf array will be like:
$db_conf = array();
$db_conf["type"] = "mysqli"; // mysql,oci8(for oracle),mssql,postgres,sybase
$db_conf["server"] = "localhost";
$db_conf["user"] = "DBUser";
$db_conf["password"] = "PASS";
$db_conf["database"] = "griddemo";
$grid = new jqgrid($db_conf);
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?