[phpMyAdmin Developers] phpmyadmin database update

Michal Čihař michal at cihar.com
Mon Jul 17 19:42:34 CEST 2017


Hi

Manish Bisht píše v Po 17. 07. 2017 v 23:02 +0530:
> 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.

You need to pass ajax_request in the request in case you want it to
output JSON only.

-- 
	Michal Čihař | https://cihar.com/ | https://weblate.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.phpmyadmin.net/pipermail/developers/attachments/20170717/1227e5e6/attachment.sig>


More information about the Developers mailing list