Home › Forums › Guriddo Suito PHP › Firebird PDO
Tagged: firebird PDO
Hi,
I’m using old version of jqgrid (4.3 perhaps).. and I’m using PDO firebird as connection.
I’d like to buy php version, but is it already support for firebird PDO ?
Best Regards,
Ari Adrianto
Hello,
Currently there is no Firebird jqGrid driver.
Do you think serious that you will use jqGrid with this driver?
We will investigate this (Firebird PDO PHP driver before some time was really useless) and will let you know.
Kind Regards,
I’m using firebird PDO …
or can I use adodb to firebird ?
Best Regards,
Ari Adrianto
Hello,
jqGrid has a port to adodb, so you can use adodb firebird driver in jqGrid.
Here is a adobd example
Kind Regards,
I’ll try your trial version first… and I’ll tell you then about adodb implementation with firebird.
Regards,
By the way… please support firebird PDO soon…
I really need it…
Regards,
Ari
I’ve already tried using adodb to firebird… but failed… can’t even connect…
AFAIK, cannot use $conn->connect on firebird, must used $conn->PConnect …
Hello,
You can use PConnect without problems.
Also you must first sure that adodb is correct installed and then make the connection.
After these operations you can use jqGrid with adoddb.
Kind Regards,
Hi Tony…
I’ve been searching on how to run using adodb… but no luck…
I can assure that our database working properly.
here’s my code :
jq-config.php
<?php
// ** MySQL settings ** //
//define(‘DB_NAME’, ‘northwind’); // The name of the database
//define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_DSN’,’firebird:host=localhost;dbname=northwind’);
define(‘DB_USER’, ‘SYSDBA’); // Your MySQL username
define(‘DB_PASSWORD’, ‘masterkey’); // …and password
define(‘DB_DATABASE’, ‘localhost://var/lib/firebird/2.5/data/northwind.fdb’); // …and passworddefine(‘ABSPATH’, ‘../../../../’);
// Form settings
$SERVER_HOST = “”; // the host name
$SELF_PATH = “”; // the web path to the project without http
$CODE_PATH = “../../../../php/PHPSuito/”; // the physical path to the php files
grid.php
<?php
require_once ‘../../jq-config.php’;
// include the jqGrid Class
require_once ABSPATH.”php/PHPSuito/jqGrid.php”;
require_once ABSPATH.”php/PHPSuito/DBdrivers/jqGridAdodb.php”;
// include the driver class
define(‘ADODB_ASSOC_CASE’, 2);
require_once ABSPATH.”php/PHPSuito/External/adodb5/adodb.inc.php”;// Connection to the server
$conn = ADONewConnection(‘firebird’);if (!$conn->Connect(‘localhost’,DB_USER,DB_PASSWORD,DB_DATABASE)) { echo ‘error : ‘.$conn->ErrorMsg(); }
//if (!$conn->Connect(‘localhost’,DB_USER,DB_PASSWORD,DB_DATABASE)) err($conn->ErrorNo(). $sep . $conn->ErrorMsg());//$conn->Execute(“SET NAMES utf8”);
// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Data from this SQL is 1252 encoded, so we need to tell the grid
// Set the SQL Data source
$table = ‘PRODUCTS’;
echo $table;
$grid->SelectCommand =’SELECT * FROM ‘.$table;// set the ouput format to XML
$grid->dataType = ‘json’;
// Let the grid create the model
$grid->setPrimaryKeyId(“PRODUCTID”);
$grid->setColModel();
$grid->table = $table;
// set labels in the header
$grid->setColProperty(“PRODUCTID”, array(“label”=>”ID”));
$grid->setColProperty(“PRODUCTNAME”, array(“label”=>”Name”));
$grid->setColProperty(“QUANTITYPERUNIT”, array(“label”=>”Unit”));
$grid->setColProperty(“UNITPRICE”, array(“label”=>”Unit Price”));
// We can hide some columns
$grid->setColProperty(“SUPPLIERID”, array(“hidden”=>true));
$grid->setColProperty(“CATEGORYID”, array(“hidden”=>true));
$grid->setColProperty(“UNITSONORDER”, array(“hidden”=>true));
$grid->setColProperty(“REORDERLEVEL”, array(“hidden”=>true));
$grid->setColProperty(“DISCONTINUED”, array(“hidden”=>true));
// Set the url from where we obtain the data
echo “before grid”;
$grid->setUrl(‘grid.php’);
// Set some grid options
$grid->setGridOptions(array(“rowNum”=>10,”rowList”=>array(10,20,30),”sortname”=>”CATEGORYID”));
// Enable toolbar searching
$grid->toolbarfilter = true;
$grid->navigator = true;
$grid->setNavOptions(‘navigator’,array(“csv”=>true, “pdf”=>true));
$grid->setFilterOptions(array(“stringResult”=>true));
// Enjoy
$grid->renderGrid(‘#grid’,’#pager’,true, null, null, true,true);
echo “finish”;
and it’s getting stuck on setColModel().
Please I really need it . Would you like to give me working example jqgrid using adodb on firebird.. please…
I’ll buy your product then…
Regards,
Ari Adrianto
Hello Ari,
If you do not use jqGrid PHP and only ADODb do you can make successful connection and query?
Did you try this?
What is the erro reported?
Please remove all echo command and to the following:
1.At beginning of the grid PHP file do:
iniset(“display_errors”,1);
2. Set in grid file
$grid->showError = true;
3. set in grid file
$grid->debug = true
and see jqGrid.log file
In the meantime we will see what to do.
Kind Regards,
Hello Ari,
We have try to create a Firebird PDO driver, but we found a missing feature which stops us to do this.
The problem is that the driver does not support getColumnMeta. This function is very important to jqGrid.
We now have performed other investigations and it seems that we can develop a driver to Firebird, but when we use ibase one
Please let us know if you are interested on this, so that we go to support firebird via this driver.
Kind Regards,
Wow… Thats great… I really interested ..
Do i have to buy first to support you ?
Anyway, i’d test with adodb too …
I will touch you on any progress then…
Hello Tony,
I can assure you that our adodb working fine…
but not your grid..
<?php
ini_set(“display_errors”,”on”);
error_reporting(E_ALL);
require_once ‘../../jq-config.php’;
// include the jqGrid Class
require_once ABSPATH.”php/PHPSuito/jqGrid.php”;
require_once ABSPATH.”php/PHPSuito/DBdrivers/jqGridAdodb.php”;
// include the driver class
define(‘ADODB_ASSOC_CASE’, 2);
require_once ABSPATH.”php/PHPSuito/External/adodb5/adodb.inc.php”;// Connection to the server
$conn = &ADONewConnection(‘firebird’);
$conn->PConnect(DB_DATABASE,DB_USER,DB_PASSWORD);$sql = “select first 10 customerid, customer from customer”;
$rs = $conn->Execute($sql) or die(“err : “. $sql);
while ($array = $rs->FetchRow()) {
print_r($array); //this print working fine
echo “<br>”;
}$conn->Execute(“SET NAMES utf8”);
// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Data from this SQL is 1252 encoded, so we need to tell the grid
// Set the SQL Data source
$grid->showError = true;
$grid->debug = true;
$table = ‘CUSTOMER’;
//echo $table;
$grid->SelectCommand =’SELECT * FROM ‘.$table;// set the ouput format to XML
$grid->dataType = ‘json’;
// Let the grid create the model
$grid->setPrimaryKeyId(“CUSTOMERID”);
$grid->setColModel();
$grid->table = $table;
// set labels in the header
$grid->setColProperty(“CUSTOMERID”, array(“label”=>”ID”));
$grid->setColProperty(“CUSTOMER”, array(“label”=>”Customer”));$grid->setUrl(‘grid.php’);
// Set some grid options
$grid->setGridOptions(array(“rowNum”=>10,”rowList”=>array(10,20,30),”sortname”=>”CUSTOMER”));
// Enable toolbar searching
$grid->toolbarfilter = true;
$grid->navigator = true;
$grid->setNavOptions(‘navigator’,array(“csv”=>true, “pdf”=>true));
$grid->setFilterOptions(array(“stringResult”=>true));
// Enjoy
$grid->renderGrid(‘#grid’,’#pager’,true, null, null, true,true);
//echo “finish”;
Hello,
In order this to work, please remove all echo and print_r functions from the grid php file. These comand do not allow the grid to load a data.
My question is: What is happen?
Is there a error? If yes what is the error?
What is the contents of the jqGrid.log file.
We have successfully run firebird with jqGrid in our system.
Anyway we will try to finish this driver at end of week, and we will notify you.
Kind Regards,
Hi Tony,
It’s working using adodb…
I’m going to explore it.
looks promising…
Already bought your subscription software…
please make it available for firebird PDO…
best regards,
Ari
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top