Selecting PHP variables from joined tables
<p>I am still trying to learn PHP and have some issues with this code. I have a field $youtubeurl in ID_Vehicles and I am trying to output some code if that field has data in it how do I select that field with this join to output the value like the sample below?</p>

<pre><code>   function getDealerSettings($vid)
    {
        include('db.php');
        $query = "SELECT banner, ebay_htmlcss FROM ebay_dealersettings INNER JOIN ID_vehicles ON ebay_dealersettings.did=ID_vehicles.did WHERE vid='".$vid."'";
        $result = @mysql_query($query);
        if ($result)
        {
            $row = mysql_fetch_assoc($result);
            return array("banner" =&gt; trim($row['banner']), "css" =&gt; str_replace(array("\n", "\t"), " ",$row['ebay_htmlcss']));
        }
        return "";
    }

    function getTemplate($vid)
    {
        $code = "";
        extract($this-&gt;getDealerSettings($vid));
        if (!empty($youtubeurl))
            $code .= "$youtubeurl";
</code></pre>
