Add extra button on webform and Ajaxify
Db Query in Ajax callback. I would suggest to change type of Ajax-Button from submit to button.
In callback return instead of print. You should also use -&gt;fetchAll() for instance after -&gt;execute()