Example: currentUserHasPrivilege('CREATE ROUTINE', 'mydb');
Checks if the currently logged in user has the global
'CREATE ROUTINE' privilege or, if not, checks if the
user has this privilege on database 'mydb'.
public static currentUserHasPrivilege ( string $priv, mixed $db = null, mixed $tbl = null ) : boolean | ||
$priv | string | The privilege to check |
$db | mixed | null, to only check global privileges string, db name where to also check for privileges |
$tbl | mixed | null, to only check global/db privileges string, table name where to also check for privileges |
return | boolean |