[phpMyAdmin Developers] phpmyadmin database update
Manish Bisht
manish.bisht490 at gmail.com
Mon Jul 17 18:22:39 CEST 2017
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
Email : hi at manishbisht.me
Website : https://manishbisht.me
On Mon, Jul 17, 2017 at 6:33 PM, Manish Bisht <manish.bisht490 at 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
> Email : hi at manishbisht.me
> Website : https://manishbisht.me
>
>
> On Mon, Jul 17, 2017 at 4:57 PM, Raghuram Vadapalli <
> raghuram.vadapalli at 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 at 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
>> Email : hi at manishbisht.me
>> Website : https://manishbisht.me
>>
>>
>> On Sat, Jul 15, 2017 at 5:07 PM, Manish Bisht <manish.bisht490 at 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
>>> Email : hi at manishbisht.me
>>> Website : https://manishbisht.me
>>>
>>>
>>> On Sat, Jul 15, 2017 at 5:02 PM, Raghuram Vadapalli <
>>> raghuram.vadapalli at 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 at 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
>>>>> Email : hi at manishbisht.me
>>>>> Website : https://manishbisht.me
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Developers mailing list
>>>>> Developers at phpmyadmin.net
>>>>> https://lists.phpmyadmin.net/mailman/listinfo/developers
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Developers mailing list
>>>> Developers at phpmyadmin.net
>>>> https://lists.phpmyadmin.net/mailman/listinfo/developers
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Developers mailing list
>> Developers at phpmyadmin.net
>> https://lists.phpmyadmin.net/mailman/listinfo/developers
>>
>>
>>
>> _______________________________________________
>> Developers mailing list
>> Developers at phpmyadmin.net
>> https://lists.phpmyadmin.net/mailman/listinfo/developers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.phpmyadmin.net/pipermail/developers/attachments/20170717/4f7a5d42/attachment.html>
More information about the Developers
mailing list