I screwed up.

I had:

PHP Code:
  if ($tv_display_size->RecordCount()>0) {  and (isset($cPath) and $cPath == '967')) { 
Instead of:

PHP Code:
  if ($tv_display_size->RecordCount()>and (isset($cPath) and $cPath == '967')) { 
Works like a charm, thank you!