Estou testando um sisteminha utilizando o EyeDataGrid. Porém, não estou conseguindo fazer com que a variável "tabela", recebida pelo método $_GET, seja reconhecida. Atribuindo o valor de "tabela" à $var_tabela, dá certo e ela aparece devidamente com o comando echo. Porém, na hora da função SetQuery utilizá-la, dá erro. Fazendo vários testes, descobri que a SetQuery considera que a variável está vazia. Segue o código completo: <?php require 'eyedatagrid_class.eyemysqladap.inc.php'; require 'eyedatagrid_class.eyedatagrid.inc.php'; require "funcoes.php"; $db = new EyeMySQLAdap('localhost', 'root', '', 'projetando'); // Carregar adaptador da base de dados // Load the datagrid class $x = new EyeDataGrid($db); $var_tabela = $_GET['tabela']; echo $var_tabela; $x->setQuery("*", $var_tabela, "Id"); // Mudar o texto dos cabeçalhos $x->setColumnHeader('nome_atividade', 'Nome da atividade'); $x->setColumnHeader('datainicio', 'Data de início'); // Mudar tipo de coluna $x->setColumnType('nome_atividade', EyeDataGrid::TYPE_HREF, 'inserir_tarefas.php?projeto=projetos_2_1_%id%'); // Atribuir os links $x->setColumnType('projeto', EyeDataGrid::TYPE_HREF, ''); // Atribuir os links $x->setColumnType('datainicio', EyeDataGrid::TYPE_DATE, 'd/m/y', true); // Change the date format $x->setColumnType('Gender', EyeDataGrid::TYPE_ARRAY, array('m' => 'Male', 'f' => 'Female')); // Convert db values to something better $x->setColumnType('Done', EyeDataGrid::TYPE_PERCENT, false, array('Back' => '#c3daf9', 'Fore' => 'black')); // Configurar controles que vão aparecer $x->hideColumn('id'); // Esconder coluna 'id' $x->allowFilters(); // Permitir filtros $x->showReset(); // Apresentar controle de resetar tabela $x->addCustomControl(EyeDataGrid::CUSCTRL_TEXT, "alert('%FirstName%\'s been promoted!')", EyeDataGrid::TYPE_ONCLICK, 'Me promova'); // Add custom control, order does matter $x->addStandardControl(EyeDataGrid::STDCTRL_EDIT, "alert('Editing %nome_atividade%, %FirstName% (ID: %_P%)')"); // Adicionar controle de edição $x->addStandardControl(EyeDataGrid::STDCTRL_DELETE, "alert('Deleting %_P%')"); // Adicionar controle de exclusão $x->showCreateButton("alert('Desenvolver código')", EyeDataGrid::TYPE_ONCLICK, 'Adicionar novo'); // Adicionar controle de adição de novo $x->showCheckboxes(); // Mostrar checkboxes $x->showRowNumber(); // Mostrar números de coluna // Exemplo de aplicação de uma função a uma coluna function returnSomething($lastname) { return strrev($lastname); } $x->setColumnType('LastName', EyeDataGrid::TYPE_FUNCTION, 'returnSomething', '%LastName%'); if (EyeDataGrid::isAjaxUsed()) { $x->printTable(); exit; } ?> <html> <head> <title>EyeDataGrid Example 5</title> <link href=eyedatagrid_table.css" rel="stylesheet" type="text/css"> </head> <body> <?php // Imprimir a tabela EyeDataGrid::useAjaxTable(); ?> </body> </html> Com esse código, se eu chamar o link http://localhost/projetando/ex5.php?tabela=projetos_1, aparece a seguinte tela: projetos_1 Notice: Uncovered an error in your SQL query script: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 10' at line 1" in C:\xampplite\htdocs\projetando\eyedatagrid_class.eyemysqladap.inc.php on line 122 Oops! We ran into a problem while trying to output the table. Click here to reset the table or here to review the error. Se eu modificar o SetQuery colocando diretamente o valor "projetos_1", ao invés da variável, dá certo: $x->setQuery("*", 'projetos_1', "Id"); Aí funciona... Fuçando um pouco mais, procurei concatear outra string ("algoamais") à variável $var_tabela, e percebi que o setQuery não busca a tabela "projetos_1algoamais", somente a tabela "algoamais". Isto é, o que veio do GET é desconsiderado: $var_tabela = $_GET['tabela]."algoamais"; echo $var_tabela; $x->setQuery("*", $var_tabela, "Id"); Aparece: projetos_1algoamais algoamais Notice: Uncovered an error in your SQL query script: "Table 'projetando.algoamais' doesn't exist" in C:\xampplite\htdocs\projetando\eyedatagrid_class.eyemysqladap.inc.php on line 122 Oops! We ran into a problem while trying to output the table. Click here to reset the table or here to review the error. O que pode estar causando esses erros? obrigado