2 Mayıs 2021 Pazar

Html Summary Kullanımı

<details>
      <summary>Click To Open</summary>
      Hey, im natively collapsable. My content remains hidden till you click on Summary.
</details>
Çıktı:
Click To Open Hey, im natively collapsable. My content remains hidden till you click on Summary.

Mysql View Oluşturmak

CREATE VIEW view_adı 
AS 
SELECT * FROM tablo_adi

Mysql Fonksiyon Oluşturmak

DELIMITER $$
CREATE DEFINER=`root`@`localhost` FUNCTION `DENEME`(`id_no` INT(11)) RETURNS varchar(50) CHARSET utf8mb4
BEGIN
DECLARE UNAME VARCHAR(100);
SELECT k.ad AS kad INTO UNAME FROM kisi AS k WHERE id=id_no LIMIT 1;
RETURN UNAME;
END$$
DELIMITER ;

3 Ocak 2021 Pazar

Php İstisnalar

 


        try{
            if(is_array($x)){
                echo "bir array girdiniz.";                
            }
            else{
                throw new Exception("$x bir array değil!");
            }
        } catch(Exception $hata){
            echo "Hata: ".$hata->getMessage();
        } catch(InvalidArgumentException $hata){
            echo "merhaba";
        } 
        
        finally{
            echo "huhuhu".PHP_EOL;
        }