visual query builder

hi all,

 

i would like to use a visual query builder to process my query. but when i execute the query the error says taht i'm not connected to the database. i've connected to the database many times but the error still ocur. could anyone guide me on how to use a query builder and get a result.