<?php
$link = new mysqli('localhost', 'root', '', 'ddfichain');
if ($link->connect_error) {
    die('CONNECT_ERROR: ' . $link->connect_error);
}
$res = $link->query("SHOW COLUMNS FROM settings LIKE 'site_logo'");
if ($res === false) {
    die('QUERY_ERROR: ' . $link->error);
}
echo ($res->num_rows > 0 ? 'exists' : 'missing');
$link->close();
