I have created a new progress.php file in root directory and when I open this file in browser it doesn't show me the data. 

use PhpMyAdmin\DatabaseInterface;
$GLOBALS['dbi']->selectDb($cfgRelation['db']);
$sql_query = 'SELECT * FROM ' . $cfgRelation['progress'] . ' WHERE type = "export"';
$result = $GLOBALS['dbi']->query($sql_query);
$result = $GLOBALS['dbi']->fetchRow($result);
echo json_encode($result);
and when I add one extra line(mentioned below) it show me the data but with navigation and tabs which I don't need.
include_once 'libraries/common.inc.php';
I think this might be due to the some security reason. Any way I can show data on this page in JSON format.

Manish Bisht


On Mon, Jul 17, 2017 at 9:52 PM, Manish Bisht <manish.bisht490@gmail.com> wrote:
I found three ways to execute the query. What is the difference between these.
$GLOBALS['dbi']->query($sql_query);
$GLOBALS['dbi']->tryQuery($sql_query);
PMA_queryAsControlUser($sql_query);

What is the difference between these. What I know is query() returns error and tryQuery() doesn't returns error.

Thanks,


Manish Bisht


On Mon, Jul 17, 2017 at 6:33 PM, Manish Bisht <manish.bisht490@gmail.com> wrote:
I have not passed any parameter to function operating with DBI. But the following statements run successfully.

$GLOBALS['dbi']->selectDb('phpmyadmin');
$GLOBALS['dbi']->tryQuery('INSERT INTO `pma__progress` VALUES ("sas", "sas", 50, 100)');

This might be due to I am logged in as root.

When we add any table column to central columns from table structure page it was added configuration storage in table pma__central_column.

I want to do the similar kind of operation and insert data in configuration storage in pma__progress table. The above statements are running without any errors. But the issue is I think there is a better way to implement the above statements because in the entire project directory I have not found that the configuration storage database name and table are hard coded in the statements like I am doing.

Thanks,

Manish Bisht


On Mon, Jul 17, 2017 at 4:57 PM, Raghuram Vadapalli <raghuram.vadapalli@research.iiit.ac.in> wrote:
Hi Manish,

When you are dealing with configuration storage, you need to use controluser link for database interface. Otherwise, it will use current user to execute queries. Current user may not have permissions to even access phpmyadmin database. You can do this by passing $GLOBALS['controluser'] as parameter to any function operating with DBI. I am assuming that you have set up controluser and similar parameters in config.inc.php file. If it still doesn't work, please share the error you are getting.

Regards,
Raghuram

On 17-Jul-2017 3:16 PM, "Manish Bisht" <manish.bisht490@gmail.com> wrote:
How to use the phpmyadmin configuration database properly.

I am using the following code.

$GLOBALS['dbi']->selectDb('phpmyadmin');
$GLOBALS['dbi']->tryQuery('INSERT INTO `pma__progress` VALUES ("sas", "sas", 50, 100)');

Let me know if I am correct or wrong. I think I am missing something.


Manish Bisht


On Sat, Jul 15, 2017 at 5:07 PM, Manish Bisht <manish.bisht490@gmail.com> wrote:
Thanks

Just created the table by running import.

How to save data in the tables by running queries from any file.

Manish Bisht


On Sat, Jul 15, 2017 at 5:02 PM, Raghuram Vadapalli <raghuram.vadapalli@research.iiit.ac.in> wrote:
Hi,

You have to run that sql file. Running it is part of installation process as far as I know.

Regards, 
Raghuram


On 15-Jul-2017 4:38 PM, "Manish Bisht" <manish.bisht490@gmail.com> wrote:
Hi,

To store the import/export progress I have added one new table in sql/create_tables.sql file but I can't see my new table in the phpmyadmin database. How to update phpmyadmin database from that file. I guess there is something that do it automatically instead of manually executing the statement.

Thanks,

Manish Bisht


_______________________________________________
Developers mailing list
Developers@phpmyadmin.net
https://lists.phpmyadmin.net/mailman/listinfo/developers


_______________________________________________
Developers mailing list
Developers@phpmyadmin.net
https://lists.phpmyadmin.net/mailman/listinfo/developers




_______________________________________________
Developers mailing list
Developers@phpmyadmin.net
https://lists.phpmyadmin.net/mailman/listinfo/developers



_______________________________________________
Developers mailing list
Developers@phpmyadmin.net
https://lists.phpmyadmin.net/mailman/listinfo/developers