sql >> Base de Datos >  >> RDS >> Mysql

Poner div en MYSQL morir

Es mejor hacer una función para mostrar errores:

function show_error($error_text){
    $var = '<div class="ui-widget">
        <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
        <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
        <strong>'.$error_text.'</strong></p>
        </div>
        </div>';
    die($var);
}

y luego úsalo así:

mysql_query($query) or show_error('Query execute failed');