Hi Tony…
I ‘ve change jqgrid.php to solve my problem in :
protected function getStringForGroup( $group, $prm )
I’ve change :
1 2 3 4 |
$v = strtoupper($val['data']); // to replace this //$v = $val['data']; |
But if you have any better solution… please tell me.
thanks.
Hi Tony,
I’ve implemented simple uppercase on post like this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
require_once '../jq-config.php'; $grid = new jqGridRender($conn); $table = 'DIVISI'; $_REQUEST['filters'] = strtoupper($_REQUEST['filters']); $grid->SelectCommand ='SELECT DIVISIID, GROUPS, DIVISI FROM '.$table; $grid->dataType = 'json'; $grid->setPrimaryKeyId("DIVISIID"); $grid->setColModel(); $grid->table = $table; $grid->setColProperty("DIVISIID", array("label"=>"ID", "hidden"=>true)); $grid->setColProperty("GROUPS", array("label"=>"Groups","width"=>30, "editoptions"=>array("style"=>"text-transform: uppercase;") ,"searchoptions"=>array("sopt"=>array("cn"), "style"=>"text-transform: uppercase;"))); $grid->setColProperty("DIVISI", array( "label"=>"Divisi", "width"=>90, "editoptions"=>array("style"=>"text-transform: uppercase;"), "searchoptions"=>array("sopt"=>array("cn"), "style"=>"text-transform: uppercase;" ) )); $grid->setUrl('divisi_.php'); $grid->setGridOptions(array("rowNum"=>99999,"rowList"=>array(10,20,30),"sortname"=>"DIVISI", "width"=>"500")); $grid->toolbarfilter = true; $grid->navigator = true; $grid->setNavOptions('navigator', array("excel"=>true,"add"=>true,"edit"=>true,"del"=>true,"view"=>true)); $grid->setFilterOptions(array("stringResult"=>true,"searchOperators"=>true,"searchOnEnter"=>true,"defaultSearch"=>"cn","ignoreCase"=>true)); $grid->renderGrid('#grid','#pager',true, null, null, true,true); $oper = $_POST['oper']; if($oper == 'add') { $grid->table = 'DIVISI'; $grid->setPrimaryKeyId('DIVISIID'); $data = array_map("strtoupper", $_POST); $grid->insert($data); } else if($oper == 'edit') { $grid->table = 'DIVISI'; $grid->setPrimaryKeyId('DIVISIID'); $data = array_map("strtoupper", $_POST); //array_map("strtoupper", $sample_array); $grid->update($data); } else { $grid->setUrl('divisi_.php'); } |
I’m using arraymap on data add and edit… but if you have any better solution, would be grateful .
Hi Tony,
this is my code.. maybe you can give suggestion on uppercase search. This is just a little thing, but I need it… :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
<!--?php //iniset("display_errors",1); require_once '../jq-config.php'; // Create the jqGrid instance $grid = new jqGridRender($conn); $table = 'DIVISI'; $_REQUEST['filters'] = strtoupper($_REQUEST['filters']); $grid->SelectCommand ='SELECT DIVISIID, GROUPS, DIVISI FROM '.$table;</p> <p>// set the ouput format to XML<br ?--> require_once '../jq-config.php'; $grid = new jqGridRender($conn); $table = 'DIVISI'; $_REQUEST['filters'] = strtoupper($_REQUEST['filters']); $grid->SelectCommand ='SELECT DIVISIID, GROUPS, DIVISI FROM '.$table; $grid->dataType = 'json'; $grid->setPrimaryKeyId("DIVISIID"); $grid->setColModel(); $grid->table = $table; $grid->setColProperty("DIVISIID", array("label"=>"ID", "hidden"=>true)); $grid->setColProperty("GROUPS", array("label"=>"Groups","width"=>30, "editoptions"=>array("style"=>"text-transform: uppercase;") ,"searchoptions"=>array("sopt"=>array("cn"), "style"=>"text-transform: uppercase;"))); $grid->setColProperty("DIVISI", array( "label"=>"Divisi", "width"=>90, "editoptions"=>array("style"=>"text-transform: uppercase;"), "searchoptions"=>array("sopt"=>array("cn"), "style"=>"text-transform: uppercase;" ) )); $grid->setUrl('divisi_.php'); $grid->setGridOptions(array("rowNum"=>99999,"rowList"=>array(10,20,30),"sortname"=>"DIVISI", "width"=>"500")); $grid->toolbarfilter = true; $grid->navigator = true; $grid->setNavOptions('navigator', array("excel"=>true,"add"=>true,"edit"=>true,"del"=>true,"view"=>true)); $grid->setFilterOptions(array("stringResult"=>true,"searchOperators"=>true,"searchOnEnter"=>true,"defaultSearch"=>"cn","ignoreCase"=>true)); $grid->renderGrid('#grid','#pager',true, null, null, true,true); $oper = $_POST['oper']; if($oper == 'add') { $grid->table = 'DIVISI'; $grid->setPrimaryKeyId('DIVISIID'); $data = array_map("strtoupper", $_POST); $grid->insert($data); } else if($oper == 'edit') { $grid->table = 'DIVISI'; $grid->setPrimaryKeyId('DIVISIID'); $data = array_map("strtoupper", $_POST); //array_map("strtoupper", $sample_array); $grid->update($data); } else { $grid->setUrl('divisi_.php'); } |
Thanks.
Hi tony,
I don’t think to change on 200 firebird tables that has a bunch of records, would be wise.
Are there any other ways to change $_REQUEST filter before execute sql ? Just like I did when using jqgrid javascript ….
When I used jqgrid javascript, i can handle “where statement”:
1 2 |
$wh = strtoupper($wh); |
So I can handle sql before load :
$sql = “select * from division where 1=1 $wh “;
and where I can put firebird case sensitive searching, on jqgrid suite php…
Already bought your subscription software…
please make it available for firebird PDO…
best regards,
Ari
Hi Tony,
It’s working using adodb…
I’m going to explore it.
looks promising…
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”;
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…
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
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 …
By the way… please support firebird PDO soon…
I really need it…
Regards,
Ari
I’ll try your trial version first… and I’ll tell you then about adodb implementation with firebird.
Regards,
I’m using firebird PDO …
or can I use adodb to firebird ?
Best Regards,
Ari Adrianto
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top