PHP Classes

Americo

Recommend this page to a friend!

      phpMyDataGrid - AJAX Enabled Datagrid  >  All threads  >  Americo  >  (Un) Subscribe thread alerts  
Subject:Americo
Summary:AdoDb with phpMyDataGrid
Messages:1
Author:americo belmiro de souza neto
Date:2008-10-20 19:32:26
 

  1. Americo   Reply   Report abuse  
Picture of americo belmiro de souza neto americo belmiro de souza neto - 2008-10-20 19:32:27
I want an example of using adodb with Firebird and phpMydataGrid

it's always error when

SQL Error found in query: SELECT count(*) FROM fornecedores ORDER BY nome DESC

Error Message: Dynamic SQL Error SQL error code = -901 feature is not supported

See the code below caught the corner and just moved to the Firebird

<?php
include ("phpmydatagrid.class.php");

$objGrid = new datagrid;

$objGrid -> friendlyHTML();

$objGrid -> pathtoimages("./images/");

$objGrid -> closeTags(true);

$objGrid -> form('fornecedores', true);

$objGrid -> methodForm("post");

//$objGrid -> total("salary,workeddays");

$objGrid -> searchby("nome");

$objGrid -> linkparam("sess=".$_REQUEST["sess"]."&username=".$_REQUEST["username"]);

$objGrid -> decimalDigits(2);

$objGrid -> decimalPoint(",");

/* ADOdb library must be included */
include_once('adodb5/adodb.inc.php');

/* to use ADOdb is so simple as say true */
$objGrid -> conectadb("192.168.63.1", "SYSDBA", "22955900", ":/var/www/htdocs/americo/compras/COMPRAS.FDB", true, "firebird");

$objGrid -> tabla ("fornecedores");

$objGrid -> buttons(true,true,true,true);

$objGrid -> keyfield("codigo");

//$objGrid -> salt("Some Code4Stronger(Protection)");

$objGrid -> TituloGrid("phpMyDataGrid Sample page");

$objGrid -> FooterGrid("<div style='float:left'>&copy; 2007 Gurusistemas.com</div>");

$objGrid -> datarows(5);

$objGrid -> paginationmode('links');

$objGrid -> orderby("nome", "DESC");

$objGrid -> noorderarrows();

$objGrid -> FormatColumn("codigo", "Cd. fornec", 5, 5, 1, "50", "center", "integer");
$objGrid -> FormatColumn("nome", "Nome", 30, 30, 0, "150", "left");
/* $objGrid -> FormatColumn("lastname", "Last name", 30, 30, 0, "150", "left");
$objGrid -> FormatColumn("age", "Age", 5, 5, 0, "50", "right");
$objGrid -> FormatColumn("afiliation", "Afiliation Date", 10, 10, 0, "100", "center", "date:dmy:/");
$objGrid -> FormatColumn("status", "Status", 5, 5, 0, "60", "left", "select:1_Single:2_Married:3_Divorced");
$objGrid -> FormatColumn("active", "Active", 2, 2, 0,"50", "center", "check:No:Yes");
$objGrid -> FormatColumn("salary", "Salary", 10, 10, 0, "90", "right", "2");
$objGrid -> FormatColumn("workeddays","Work days", "10", "10", "5","100","left","chart:percent:val:31");*/

//$objGrid -> where ("active = '1'");

$objGrid -> setHeader();
?>
</head>

<body>
<?php
$objGrid -> ajax("silent");

$objGrid -> grid();

$objGrid -> desconectar();
?>