Update query to JDatabase format

Query updated in component.