what you need to do is have a recordset on your page which will return rows if the brandsid is present.
you can then use a dreamweaver server behavior to show 'content' if your recordset is not empty.
follow this with a dreamweaver server behavior to show 'other content' if your recordset is empty.