Error in query: SELECT MAX(id) as maxid FROM portfolio WHERE subnav_id = portfolio LIMIT 1. Unknown column 'portfolio' in 'where clause'