execute query and use die in php

PHP
$db_object->return_query($sql_data) or die("error here : ".$sql_data)
Source

Also in PHP: