Code PHP:
$parents	= $db->prepare("
			SELECT c.*, sc.is_visible, sc.id as sc_id 
				FROM category c
				JOIN site_category sc ON (c.category_id = sc.category_id AND sc.site_id = :site_id)
				WHERE sc.parent_id = :parent_id  AND sc.site_id = :site_id  $categoryId  $isVisible
			ORDER BY sc.position 
		");
 
		$parents->bindValue('site_id', 		$siteId);
		$parents->bindValue('parent_id', 	$parentId);
		$parents->execute();
		$items = $parents->fetchAll(PDO::FETCH_OBJ);

:site_id is used twice in the query. On Windows XP local using PHP 5.3.0 this query works. On a Mac Or Linux server this query spits out an error.

My Question: Is this OS dependant or is it due to a setting in PHP / MYSQL.

(note sure what forum this goes in, so I've put it in both PHP and MYSQL.