i am trying to implement a PHP function that will check if a user has a privilege to execute a specific database query (e.g. CREATE TABLE).
I have checked the MySQLi manual at:
http://php.net/manual/en/book.mysqli.php
..but i could not find any API to check connected user privileges.
What would be the recommended way to check if a user has a specific privilege in MySQL using PHP 5?
Well, I do not actually understand WHY do you need such a query. If you run a non-privileged query to MySQLi via PHP, mysqli_query
statement would return an error, won't it?..