D
D
Danil Shirokikh2015-12-14 15:04:41
PHP
Danil Shirokikh, 2015-12-14 15:04:41

Is there a universal php code for displaying the result of a SQL query?

There is a task to give some employees to watch the result of some sql-query (mysql).
Tell me, is there a universal script for displaying the result of a query? As phpmyadmin - I enter a request, it displays the result in a table. Of course, I do not want to give access to pma. But to put a php script on the server, referring to which a table with the result of an sql query will be displayed (the query itself is sewn up in a file) - this is just right.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shasoft, 2015-12-14
@DanilShirokikh

You would write an example query that you want to be allowed to enter.
The easiest option is to search www.phpclasses.org
for ps and don't forget that especially smart ass will start entering queries like "DELETE" and "UPDATE". And even SELECT can give out something confidential to anyone.

A
alex1442, 2015-12-14
@alex1442

You can make a separate mysql user and severely restrict it in privileges, you can allow access only to certain tables. Forbid everything else.
and sew the necessary requests into procedures and open access to them

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question