Fetching / Extraction of Data From Database Without Refreshing Webpage: jQuery + PHP + MySQL

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

Комментарии • 106

  • @Ones_
    @Ones_ 11 лет назад

    $res = array();
    while($row = mysqli_fetch_assoc($res)){
    $res[] = $row;
    }
    print(json_encode($res));
    I did it the other way. It get the same result.
    notice that I use mysqli_, because I think mysql_ will be remove from php in the future.
    nice tuts, keep it coming! =)

  • @Ieastside4lifeI
    @Ieastside4lifeI 11 лет назад

    holy shit, i have been looking for this exact thing for the past 8+ months, thank you.

  • @finkdawg5
    @finkdawg5 11 лет назад

    Thank you, I did check the code, and after I could not figure it out, I copied and pasted the code exactly from your technotip site, and I still had the same issue. I will keep trying to debug and advise if I can find the solution. Thank you again for your tutorial!!

  • @vandinem
    @vandinem 6 лет назад +1

    Excellent video tutorial! Clear and concise.

  • @Redhatenthusiast
    @Redhatenthusiast 11 лет назад

    Thanks Satish, For sharing your talent with us

  • @NasserTabook
    @NasserTabook 11 лет назад

    Hi Satish, i want to thank you for this tutorial, i learned a lot from it.

  • @technotipDOTorg
    @technotipDOTorg  11 лет назад

    Thanks a lot Nasser ..
    All these feedback means a lot to me. Thanks again

  • @babeeshc6211
    @babeeshc6211 11 лет назад

    Hai sateesh.... thnx for the tutorial... it works properly...
    please include image uploading and downloading tutorials.....

  • @robertholland3966
    @robertholland3966 6 лет назад

    Great explanation on how it works! Excellent!!!

  • @Rooben331
    @Rooben331 11 лет назад

    Hey Satish, you are a fantastic teacher. I just want to have more and more of the cool things you can teach us. Other people do thesame thing but the effect is never thesame. You are gifted with that magic that other people don't have. Although I say magic, but I think the key word is patience. 1 thing: I went to technotipDOTcom and somewhere we can pay to learn more, but I didn't see a clear content list of the diffent courses and what their topics are. It looks like I am missing something?

  • @waka2046
    @waka2046 9 лет назад

    Hi Satish,
    Thank you for this tutorial, it really helped me a lot. But I got one question here. For example I have to fetch data from the db using the provided codes from this tutorial and then after fetch them, read them and use each separately to fetch other data from the db concerning the data chosen.
    Consider a simple scenario; lets say I have a db with doctor table (with attributes name, specialty and status). In html view I have a button that when clicked will fetch array list of all specialist from the table excluding duplicates (eg. cardiologists, dentist, dermatologist etc.) and show them to the html list, then after within each specialist group there are list of doctors that is when I click may be cardiologists then I will be able to fetch list of array doctors names from the table where their specialist is cardiology and this should be the same when I click dermatology list and others. And lastly, when I click each name of the doctor fetched the status information from the doctor table will be fetched to see whether there are available or not available. This is like a series of actions.
    Please Help how to do so....
    Regards.

  • @nenadstojkovic7141
    @nenadstojkovic7141 7 лет назад

    Thanks man. This is exactly what I was looking for.

  • @ManojYadav-te3fx
    @ManojYadav-te3fx 7 лет назад +1

    nice now got to know how to get data from db using just creating json data

  • @shabbirahmed7991
    @shabbirahmed7991 5 лет назад +1

    very good....wonderful

  • @finkdawg5
    @finkdawg5 11 лет назад +1

    Hello Satish, your tutorial was fantastic and very helpful, thank you! I am having a bug with it though... In Chrome, everything works fine, unless I hit refresh, then it does not display any mysql data at all. It does work just fine in IE though. I tried several different machines, clearing the cache, etc. and had the problem every time. I was wondering if you had this problem as well, or if you knew what might cause it? Thank you again for such a wonderful tutorial I learned a lot from it.

  • @alexanderzenonmelkis6688
    @alexanderzenonmelkis6688 10 лет назад +1

    i'm trying it but it's telling me that the my_script.js file has a problem ?

  • @taitmann6489
    @taitmann6489 4 года назад

    None of this is working for me...I did the coding exactly as you did but the json data did not show in index file. The json data format displayed in the fetch.php file but when I run the index file, nothing shows up...why could this happened? Any idea?

  • @tikirifancycentre
    @tikirifancycentre 11 лет назад

    this is great working properly. please let me know how can I put MORE button.that can show one sentence and after clicking more every displace.

  • @jp1527
    @jp1527 11 лет назад

    I followed your other tutorial on how to insert data into a db with jquery without refresh and got it working fine. I followed this tutorial and also got it working fine. How can I combine the two so I can insert data into a db from a form and have it display the posted info from the database with no refresh ala facebook status updates or twitter?

  • @raccoonair
    @raccoonair Год назад +1

    Perfect!; thanks.

  • @manaki7883
    @manaki7883 11 лет назад

    hey man, great tut. appreciate your effort

  • @josemamani1743
    @josemamani1743 8 лет назад

    Thank you! Great tutorial, very helpful...

  • @mobinshah1
    @mobinshah1 9 лет назад +1

    Great Tutorial buddy

  • @earlempic3983
    @earlempic3983 9 лет назад

    you making my life easier! thanks! :D

  • @robertbosch7124
    @robertbosch7124 11 лет назад

    this is exactly what i am looking for! Thanks so much!
    is it possible for you to show me how to do this on joomla please?

  • @Amer.Salloum
    @Amer.Salloum 8 лет назад

    how to make the output text to specific UL (like get element by id) to view the data in it?

  • @RizaSavina
    @RizaSavina 11 лет назад

    thank you satish, but what if i want to make the newest data always at the top place ? can we do that ?

  • @boscoromero14
    @boscoromero14 11 лет назад

    thank you,its very usefull for me.

  • @umeshakshayan2160
    @umeshakshayan2160 9 лет назад +2

    i copied all the code from your website but it's not workin, the php file is working but there is nothing displaying in index.html

    • @yadaname
      @yadaname 9 лет назад +2

      +Umesh akshayan I was wondering you got it working? I got it up to fetch.php, but index.html display blank. Spend 2 days, no luck so far.

    • @Shadow01Net
      @Shadow01Net 9 лет назад +2

      +Arthur Chang same here

    • @Amer.Salloum
      @Amer.Salloum 8 лет назад +2

      +Umesh akshayan you should edit the MyScritp.js and remove the white spaces, it will work in this line
      $("ul").append("Admin ID: "+this['admin_id']+....etc
      make them all in one line

  • @Macky24_7
    @Macky24_7 8 лет назад

    nic3 video.. can you make a tutorial video, by using "moda"l that can display data and every time i click the modal the data will also automatic refresh.. if the data in database was change?

  • @robertholland3966
    @robertholland3966 Год назад +1

    Thank You!!!!!

  • @fani1982g
    @fani1982g 11 лет назад

    hi i need help about inserting the data into mysql through PHP script i m doing the same but my fields in the form are not bringing the data to my insert.php file in which the insertions code is written pelase guide me if you can thanks

  • @technotipDOTorg
    @technotipDOTorg  11 лет назад

    before I check your code ..make sure to visit the link present in the description section of "inserting record in sql" video tutorial. There I've posted all the code, please compare your code with the one I've posted on my blog. That's the easiest method to correct your code.

  • @katkisedpikslid
    @katkisedpikslid 11 лет назад

    Thanks alot for a great tutorial!

  • @ammarhussain2666
    @ammarhussain2666 9 лет назад

    thank you for such a good tutorial,, i have a question ,, can we convert a web app to an app using phonegap?

  • @vikrant263
    @vikrant263 9 лет назад

    vry nice tutorial

  • @ernestodelisi
    @ernestodelisi 7 лет назад

    Thanks for your videos! How can I do to bring data from my Google spreadsheet to a site with jquery?

  • @franciscosendabuiti9511
    @franciscosendabuiti9511 9 лет назад

    Excelente!
    Very very Good!

  • @batangnescafe
    @batangnescafe 11 лет назад

    can i ask where did jSon array folder came from and the folder script too?

  • @batangnescafe
    @batangnescafe 11 лет назад

    Thank You Very Much for the help sir! :)

  • @wasimqureshi6005
    @wasimqureshi6005 8 лет назад

    i want to display data from database using ajax in php by onload function.

  • @teamjacob7796
    @teamjacob7796 11 лет назад

    Thanks man really appreciate

  • @ffeirizal
    @ffeirizal 10 лет назад

    Excellent !!

  • @asharysaid5845
    @asharysaid5845 11 лет назад

    thanks for the tutorial, very helpful :)

  • @DevkantSangwanvalleyofflowers
    @DevkantSangwanvalleyofflowers 7 лет назад

    Well done ! How can we display it like facebook notification. I mean how to write the code in jquery to display.

  • @harvykevincuyno6753
    @harvykevincuyno6753 7 лет назад +1

    i followed all the steps but i dont seem to see any display in my main html

  • @waisunoo8925
    @waisunoo8925 7 лет назад +1

    thanks nice tutorial ! thumbs up

  • @heatjnr
    @heatjnr 10 лет назад

    How do I append the data to a table in rows and columns instead of ordered list. Thanks.

  • @santosh-vishwakarma
    @santosh-vishwakarma 11 лет назад

    problem solved problem was in php page which i was calling by in getJSon function..
    thanks for reply

  • @rehanalvi8149
    @rehanalvi8149 11 лет назад

    Satish thank for sharing, i copy and paste your code from techonotip but its not working please help my i am going to design a one to one chating system using this concept.
    i also connect jquery properly, and create the database.
    plz help me for this.

  • @sourishmurmu7571
    @sourishmurmu7571 10 лет назад

    very nice tute...
    if i want to display images in different divs how can we do that ???

  • @vivekbhatt3051
    @vivekbhatt3051 11 лет назад

    thanx dude.

  • @bhupeshsen909
    @bhupeshsen909 7 лет назад

    thanku yar

  • @teamjacob7796
    @teamjacob7796 11 лет назад

    How you do it if you have images in your array?

  • @rishabhluthra6328
    @rishabhluthra6328 9 лет назад +4

    I love you

  • @RustyFishHook9
    @RustyFishHook9 8 лет назад

    awesome!

  • @iSuperDuper
    @iSuperDuper 11 лет назад

    from where i get jquery-1.8.2.min.js ?

  • @MrFrankin0
    @MrFrankin0 9 лет назад

    when I try to select the text, it does not select

  • @breakink
    @breakink 9 лет назад +2

    Some of the PHP like mysql_fetch_array isn't supported in PHP 5.5 you should make a new video.

    • @mobinshah1
      @mobinshah1 9 лет назад

      Kyle Smith not needed. This video is just to get the Idea for retrieving and consuming json in PHP .

    • @Amer.Salloum
      @Amer.Salloum 8 лет назад +1

      +Kyle Smith
      In file DB.PHP make this changes to use "mysqli"
      $conn = mysqli_connect(DB_HOST,DB_USER,DB_PASS,DB_NAME) or die(mysql_error());
      in FETCH.PHP make this:
      $query = "SELECT * FROM people";
      if(mysqli_query($conn,$query))
      {
      $res = mysqli_query($conn,$query);
      }
      else
      {
      echo "Bad Connecteion";
      }
      this works for me :)

    • @jasonm.6087
      @jasonm.6087 6 лет назад

      the "or die(mysql_error());" should only ever be used for debugging and/or back-end testing - as a security precaution it should not be presented to the public facing side due to the fact that it can easily give away critical elements of your database structure - rendering the use of mysqli meaningless.

  • @NazrulIslam-iz6sw
    @NazrulIslam-iz6sw 9 лет назад

    Nice

  • @younekekohota
    @younekekohota 8 лет назад

    can u do an example on refreshing table

  • @satlibwanzai111
    @satlibwanzai111 7 лет назад

    Please explain why do you set a time delay of 0.2 sec thanks.

    • @technotipDOTorg
      @technotipDOTorg  7 лет назад

      since everything is inside my local system it'll fetch the data in fraction of seconds, so I simply wanted to show you a bit of delay - like the real applications do!

  • @kalyankumar218
    @kalyankumar218 7 лет назад

    Can anyone help in integrating facebook login,g+ login,twitter login in a website which is built in codeigniter using hybridauth

  • @sarabjeet605
    @sarabjeet605 10 лет назад

    I want the first jquery plugin...

  • @santosh-vishwakarma
    @santosh-vishwakarma 11 лет назад

    i have problam not going in side this function
    $.getJSON("j_db.php",function(data){

  • @jyotibarasker2792
    @jyotibarasker2792 7 лет назад +1

    hello sir where is your php tutorial playlist please provide me link

    • @technotipDOTorg
      @technotipDOTorg  7 лет назад

      You can look at this link ruclips.net/p/PLM4pPs1mzl_MnAMZT1vIPLRDIMRCFt7mB
      But this is not the complete list and most of these PHP tutorials are very basic. I would advise you to start learning objective php directly. OR if you have choice, you can go with MEAN stack instead of PHP.

  • @shikorie
    @shikorie 7 лет назад +1

    Thank's Man

  • @tinalouisesadian8710
    @tinalouisesadian8710 10 лет назад

    this one is very good. but can you teach me how to put it inside the table. :)

    • @shubrotoshuvo867
      @shubrotoshuvo867 10 лет назад +1

      If you know the echo function in php you can print anything from database in anywhere. The trick in echo function is the " " ' ' . Analyze it and you will unlock something!

  • @aniketpatil3628
    @aniketpatil3628 3 года назад

    good code sir cna your give index.php code bech on website it only showing js file

  • @alhussaintaher2210
    @alhussaintaher2210 10 лет назад +1

    how can i print it in a descending order

    • @G4nt3ng22
      @G4nt3ng22 8 лет назад

      +alhussain taher
      edit this query : SELECT * FROM people ORDER BY 'name' DESC
      you just add some statement with ORDER BY

  • @koteswararaokavoori3474
    @koteswararaokavoori3474 9 лет назад

    Here we are pinging database for every 2 sec? is it?

  • @mohamedourid9320
    @mohamedourid9320 7 лет назад

    tks

  • @phanikumar5941
    @phanikumar5941 9 лет назад

    Good tutorial,
    What if i have parameters to pass and how can i insert data Page without reloading, my code is something like
    $.post('fetch.php',{param1:paramval1,param2:paramval2)},function(data){
    },'json')

  • @asharysaid5845
    @asharysaid5845 11 лет назад

    awesome ... (y)

  • @arpanpatel5680
    @arpanpatel5680 11 лет назад

    thanks but this not working in ie

  • @cantugcavusoglu7656
    @cantugcavusoglu7656 9 лет назад +1

    I waste my all one day. I tried everything. It didnt work :/ Php is working though.

    • @Amer.Salloum
      @Amer.Salloum 8 лет назад

      +Cantuğ Çavuşoğlu you should edit the MyScritp.js and remove the white spaces, it will work in this line
      $("ul").append("Admin ID: "+this['admin_id']+....etc
      make them all in one line

  • @srinivasaraob7612
    @srinivasaraob7612 10 лет назад

    Thamk you mr alex

  • @technotipDOTorg
    @technotipDOTorg  11 лет назад

    First make sure the php files are working.. then implement jQuery to it.

  • @Leilektsoglou
    @Leilektsoglou 8 лет назад

    I think the table people at the start is called info (by mistake)
    Even so, the code doesn't work

    • @Leilektsoglou
      @Leilektsoglou 8 лет назад

      Finally, it worked! I did the mistake to include additional echo statements in the fetch.php file. This spoilt the functionality of my code.

  • @fani1982g
    @fani1982g 11 лет назад

    dear i m not using jquery yet, i m new to php and was watching ur earlier tutorial with inserting records in sql using php, if you give me ur email address then i will send u the source files to look at if possible these are not bigger files just 5-10 lines.

  • @santosh-vishwakarma
    @santosh-vishwakarma 11 лет назад

    u have any vediosites for learn core java, php,html,j2ee and free down load ebooks send me address.........
    thank u for reply

  • @sarabjeet605
    @sarabjeet605 10 лет назад

    I want that first jquery file jquery file..:-)

  • @loki0787
    @loki0787 11 лет назад

    You mayke doing something as this. This gives you less code :)
    $(document).ready(function(){
    nameOfFunction();
    setInterval(function(){nameOfFunction();},5000);
    });

  • @bhupeshsen909
    @bhupeshsen909 7 лет назад

    sir please make video for comments like youtube plzzzzzzzzz

  • @tikirifancycentre
    @tikirifancycentre 11 лет назад

    give me ur email. I wil send all the coding

  • @JamesSmith-cg7om
    @JamesSmith-cg7om 6 лет назад

    you need a bigger vocabulary