use global variable as WHERE clause MySQL

Hello,
I have a Grid that uses the following code in the SQL section :

SELECT a.contact_fn,a.contact_ln, a.contact_title, a.org_name_text, a.contact_zip, a.contact_key, a.contact_linkedin, a.contact_last_meeting, a.contact_email,
b.project_id,
c.project_desc
FROM contacts AS a
JOIN proj_contact AS b ON a.contact_key = b.contact_id
JOIN projects AS c ON b.project_id = c.projects_key

I want to add a WHERE clause after the JOINS
If I hard code WHERE b.project_id=‘3’
That works fine.

Where I want to use a variable [WHERE] it doesn’t work. I set the [WHERE] =“where b.project_id=‘3’” at the start of the application,
I get an error :

"Parse error: syntax error, unexpected ‘windows’ (T_STRING), expecting ‘]’ in C:\Program Files (x86)\NetMake\v9\wwwroot\scriptcase\app\MyApp\NEW_grid_contacts_1\index.php on line 619

Here is a snip of the code from index.php …line 619 specifically is open bracket after function getRunningOS();
$this->Ajax_result_set = ob_get_contents();
ob_end_clean();
if (empty($this->nm_tabela))
{
$this->nm_tabela = “contacts AS a JOIN proj_contact AS b ON a.contact_key = b.contact_id JOIN projects AS c ON b.project_id = c.projects_key " . $_SESSION[’”;
}
}

function getRunningOS();
{
$aOSInfo = array();

   if (FALSE !== strpos(strtolower(php_uname()), 'windows')) 
   {
       $aOSInfo['os'] = 'win';
   }
   elseif (FALSE !== strpos(strtolower(php_uname()), 'linux'))

Never mind…WHERE is reserved word of course…changed it to MYWHERE and all good