Ver original$qr = mysql_query($sql) or die(mysql_error());
Ver original$qr = mysqli_query($tuconexion, $sql) or die(mysqli_error(%tuconexion));