Database::fieldInfo PHP Метод

fieldInfo() публичный Метод

public fieldInfo ( $table, $fieldName ) : boolean | object:
$table string
$fieldName string
Результат boolean | object:
    public function fieldInfo($table, $fieldName)
    {
        $table = $this->addIdentifierQuotes($table);
        $prev = $this->ignoreErrors(true);
        $response = $this->doQuery("SELECT * FROM {$table} LIMIT 1;");
        $this->ignoreErrors($prev);
        if (!$response) {
            return false;
        }
        $n = intval($response->field_count);
        for ($i = 0; $i < $n; $i += 1) {
            $fieldInfoObj = $response->fetch_field_direct($i);
            if ($fieldInfoObj->name === $fieldName) {
                return $fieldInfoObj;
            }
        }
        return false;
    }