Cursor in stored procedure in phpMyAdmin

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • Advanced MySQL Concepts in php
    Share, Support, Subscribe!!!
    TH-cam: / learnwebcoding
    Facebook: / learnwebcoding
    Blog: dwebcoding.blog...
    GitHub: github.com/dur...
    Connect with Me:
    Linkedin: / durgesh-sahani
    Facebook: / durgeshsahani99
    Instagram: / durgesh.sahani99
    Twitter: / durgeshsahani99

ความคิดเห็น • 16

  • @foodhomedotcom2716
    @foodhomedotcom2716 5 ปีที่แล้ว +2

    Cool. It would help if you put that StorProc into the comments so I can copy paste it.
    I'll do that now in absence of your thoughtfulness
    BEGIN
    DECLARE bname, soldBy TEXT;
    DECLARE exit_loop BOOLEAN DEFAULT FALSE;
    DECLARE book_cursor CURSOR FOR SELECT name, sold_by FROM books;
    DECLARE CONTINUE HANDLER FOR NOT FOUND SET exit_loop = TRUE;
    OPEN book_cursor;
    book_loop: LOOP
    FETCH FROM book_cursor INTO bname, soldBy;
    IF exit_loop THEN
    LEAVE book_loop;
    END IF;
    IF soldBy = "snapdeal" THEN
    SELECT bname;
    END IF;
    END LOOP book_loop;
    CLOSE book_cursor;
    END

  • @Voudoo1
    @Voudoo1 4 ปีที่แล้ว +2

    Thankyou! You ended my 3 hours search, finally i can sleep

    • @learnWebCoding
      @learnWebCoding  4 ปีที่แล้ว

      Glad to hear that..!!

    • @nicolasmunoz6447
      @nicolasmunoz6447 4 ปีที่แล้ว

      @@learnWebCoding me too, 8:15 am has been a long night...

  • @KajalSharma-kb2pj
    @KajalSharma-kb2pj 4 ปีที่แล้ว

    Really its nyc video to know about cursor........

  • @SandeepKumar-so2st
    @SandeepKumar-so2st 4 ปีที่แล้ว

    You have explained very well in a 10 minute video.

  • @zhasan66
    @zhasan66 3 ปีที่แล้ว

    Excellent video tutorial.

  • @jbie4590
    @jbie4590 ปีที่แล้ว

    thank you so much. that's really helpful

  • @cvharibabu
    @cvharibabu 3 ปีที่แล้ว

    Good Tutorial sir! How to call this stored procedure in PHP. Please show and explain the code.

  • @michaelbeee3801
    @michaelbeee3801 4 ปีที่แล้ว

    Good Video, but I am not getting it. Why you need a cursor? I can do SELECT bname from table where soldby='amazon'; (pseudo code)

  • @Deepakchouhan-gz3em
    @Deepakchouhan-gz3em 2 ปีที่แล้ว

    sir in php frontend I use mysql_fetch_array but it's fetching only one recode how can I fetch all recode and show them in frontend

  • @ZeeshanKhan-kf9by
    @ZeeshanKhan-kf9by 2 ปีที่แล้ว

    Good bit anyone tells me in a simple way. Why do we use the stored procedures in PHPMYADMIN?
    Is it for used show result quickly, If yes Than How ?

  • @instituteofprofessionaltra3226
    @instituteofprofessionaltra3226 5 ปีที่แล้ว

    Its really helps to me .

  • @veronicamercadoperez6668
    @veronicamercadoperez6668 4 ปีที่แล้ว

    awesome! thanks :)

  • @harshpatel105
    @harshpatel105 5 ปีที่แล้ว

    Really helpful sir!