No rows are displayed, just the pagination works, mysql

All ApPHP DataGrid script bugs discussion. Questions and requests here.
Please, use a $debug_mode = true; before you say "Why Nothing Works ?!" (solves 90% of all issues)

Moderator: alexandrleonenko

Abagadaia
Newbie
Newbie
Posts: 5
Joined: Jan 13th, '14, 18:50

No rows are displayed, just the pagination works, mysql

Postby Abagadaia » Jan 13th, '14, 18:56

Hello people,

I got some trouble here, I configured the datagrid 7.9.9 on this way:

Code: Select all

   $DB_TYPE = 'mysql';
   $DB_USER = $db_user;         
   $DB_PASS = $db_pass;           
   $DB_HOST = $db_server;       
   $DB_NAME = $db_database;   
   
   $db_conn_dg = DB::factory('mysql');
   $db_conn_dg->connect(DB::parseDSN($DB_TYPE.'://'.$DB_USER.':'.$DB_PASS.'@'.$DB_HOST.'/'.$DB_NAME));
   
   $sql = " select * from aluno";
   
   $dgrid = new DataGrid(true, true, "aln_", DATAGRID_DIR);
   
   $dgrid->SetPostBackMethod("ajax");
   //$dgrid->SetInterfaceLang("pb");
   $modes = array(
         "add"    =>array("view"=>false, "edit"=>false, "type"=>"link"),
         "edit"    =>array("view"=>false, "edit"=>false,  "type"=>"link", "byFieldValue"=>""),
         "cancel"  =>array("view"=>false, "edit"=>false,  "type"=>"link"),
         "details" =>array("view"=>false, "edit"=>false, "type"=>"image"),
         "delete"  =>array("view"=>false, "edit"=>false,  "type"=>"image")
   );
   $dgrid->setModes($modes);
   $dgrid->setTableEdit("aluno", "Codigo");
   
   $dgrid->allowSorting(true);
   $dgrid->allowPaging(true, false, 'N #', false);
   
   $dgrid->dataSourceOld($db_conn_dg, $sql, "Anos", "ASC");
   
   $dgrid->Bind();


The connection return succesfully. I get NO ERRORS on the debug mode and message mode.

POST:
[datei] => 2014-01-13
[datef] => 2013-10-15
[fr] => bla
[pais] => bla
[map] => bla
[cidade] => bla
[uf] => bla
[id] => bla

GET:

FILES:
Array
(
)


But no rows are displayed for me, just the buttons of pagination.

The database is mysql, the primary key is int.

What's wrong?

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: No rows are displayed, just the pagination works, mysql

Postby administrator » Jan 14th, '14, 07:27

Please read this and use the right syntax:
viewtopic.php?f=10&t=2983

Abagadaia
Newbie
Newbie
Posts: 5
Joined: Jan 13th, '14, 18:50

Re: No rows are displayed, just the pagination works, mysql

Postby Abagadaia » Jan 14th, '14, 12:41

Hello,

I found the solution, the command Bind must be in lowcase!

Best regards,


Return to “ApPHP DataGrid {bugs}”