$title =title;
$description = descr;
$keywords = keywords;
This will generate three undefined constant notices (unless you really do have constants defined named [font=monospace]title[/font], [font=descr]title[/font], and [font=monospace]keywords[/font]), and will set the variables [font=monospace]$title[/font], [font=monospace]$description[/font], and [font=monospace]$keywords[/font] to the string values [font=monospace]"title"[/font], [font=monospace]"descr"[/font], and [font=monospace]"keywords"[/font] respectively.
And you still haven't assigned the return value of the [font=monospace]fetch[/font] call to anything.
And the loop is pointless: no more than one row will be returned by the query, and the loop is only reached if there is at least one row returned. So the loop is only reached if it will run exactly once, so why make it a loop?