PMA\libraries\DatabaseInterface::getDefinition PHP Méthode

getDefinition() public méthode

returns the definition of a specific PROCEDURE, FUNCTION, EVENT or VIEW
public getDefinition ( string $db, string $which, string $name, object $link = null ) : string
$db string db name
$which string PROCEDURE | FUNCTION | EVENT | VIEW
$name string the procedure|function|event|view name
$link object MySQL link
Résultat string the definition
    public function getDefinition($db, $which, $name, $link = null)
    {
        $returned_field = array('PROCEDURE' => 'Create Procedure', 'FUNCTION' => 'Create Function', 'EVENT' => 'Create Event', 'VIEW' => 'Create View');
        $query = 'SHOW CREATE ' . $which . ' ' . Util::backquote($db) . '.' . Util::backquote($name);
        return $this->fetchValue($query, 0, $returned_field[$which], $link);
    }