Retrieve a specific category of posts when using a custom post type

the answer my question is:

query('post_type=portfolio&posts_per_page=-1&slug=past-projects&portfolio_catego‌​ries=past-projects');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)