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

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 106

  • @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!!

  • @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.

  • @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! =)

  • @vandinem
    @vandinem 6 років тому +1

    Excellent video tutorial! Clear and concise.

  • @babeeshc6211
    @babeeshc6211 11 років тому

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

  • @Ieastside4lifeI
    @Ieastside4lifeI 11 років тому

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

  • @technotipDOTorg
    @technotipDOTorg  11 років тому

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

  • @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.

  • @robertholland3966
    @robertholland3966 6 років тому

    Great explanation on how it works! Excellent!!!

  • @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.

  • @shabbirahmed7991
    @shabbirahmed7991 5 років тому +1

    very good....wonderful

  • @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?

  • @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.

  • @nenadstojkovic7141
    @nenadstojkovic7141 7 років тому

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

  • @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?

  • @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?

  • @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?

  • @manaki7883
    @manaki7883 11 років тому

    hey man, great tut. appreciate your effort

  • @ernestodelisi
    @ernestodelisi 7 років тому

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

  • @mobinshah1
    @mobinshah1 9 років тому +1

    Great Tutorial buddy

  • @ManojYadav-te3fx
    @ManojYadav-te3fx 8 років тому +1

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

  • @boscoromero14
    @boscoromero14 11 років тому

    thank you,its very usefull for me.

  • @raccoonair
    @raccoonair 2 роки тому +1

    Perfect!; thanks.

  • @josemamani1743
    @josemamani1743 8 років тому

    Thank you! Great tutorial, very helpful...

  • @sourishmurmu7571
    @sourishmurmu7571 10 років тому

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

  • @robertholland3966
    @robertholland3966 Рік тому +1

    Thank You!!!!!

  • @earlempic3983
    @earlempic3983 9 років тому

    you making my life easier! thanks! :D

  • @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?

  • @DevkantSangwanvalleyofflowers
    @DevkantSangwanvalleyofflowers 7 років тому

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

  • @vikrant263
    @vikrant263 9 років тому

    vry nice tutorial

  • @katkisedpikslid
    @katkisedpikslid 11 років тому

    Thanks alot for a great tutorial!

  • @teamjacob7796
    @teamjacob7796 11 років тому

    Thanks man really appreciate

  • @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 ?

  • @batangnescafe
    @batangnescafe 11 років тому

    Thank You Very Much for the help sir! :)

  • @ffeirizal
    @ffeirizal 11 років тому

    Excellent !!

  • @franciscosendabuiti9511
    @franciscosendabuiti9511 9 років тому

    Excelente!
    Very very Good!

  • @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.

  • @asharysaid5845
    @asharysaid5845 11 років тому

    thanks for the tutorial, very helpful :)

  • @waisunoo8925
    @waisunoo8925 7 років тому +1

    thanks nice tutorial ! thumbs up

  • @bhupeshsen909
    @bhupeshsen909 7 років тому

    thanku yar

  • @vivekbhatt3051
    @vivekbhatt3051 11 років тому

    thanx dude.

  • @younekekohota
    @younekekohota 8 років тому

    can u do an example on refreshing table

  • @RustyFishHook9
    @RustyFishHook9 8 років тому

    awesome!

  • @santosh-vishwakarma
    @santosh-vishwakarma 11 років тому

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

  • @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?

  • @NazrulIslam-iz6sw
    @NazrulIslam-iz6sw 9 років тому

    Nice

  • @batangnescafe
    @batangnescafe 11 років тому

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

  • @shikorie
    @shikorie 7 років тому +1

    Thank's Man

  • @mohamedourid9320
    @mohamedourid9320 7 років тому

    tks

  • @asharysaid5845
    @asharysaid5845 11 років тому

    awesome ... (y)

  • @tinalouisesadian8710
    @tinalouisesadian8710 11 років тому

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

    • @shubrotoshuvo867
      @shubrotoshuvo867 11 років тому +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!

  • @heatjnr
    @heatjnr 10 років тому

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

    • @heatjnr
      @heatjnr 10 років тому

      Got it.

  • @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.

  • @sarabjeet605
    @sarabjeet605 10 років тому

    I want the first jquery plugin...

  • @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

  • @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!

  • @alexanderzenonmelkis6688
    @alexanderzenonmelkis6688 10 років тому +1

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

  • @rishabhluthra6328
    @rishabhluthra6328 9 років тому +4

    I love you

  • @wasimqureshi6005
    @wasimqureshi6005 8 років тому

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

  • @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 7 років тому

      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.

  • @aniketpatil3628
    @aniketpatil3628 4 роки тому

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

  • @iSuperDuper
    @iSuperDuper 11 років тому

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

  • @teamjacob7796
    @teamjacob7796 11 років тому

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

  • @srinivasaraob7612
    @srinivasaraob7612 10 років тому

    Thamk you mr alex

  • @technotipDOTorg
    @technotipDOTorg  11 років тому

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

  • @taitmann6489
    @taitmann6489 5 років тому

    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?

  • @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 ua-cam.com/play/PLM4pPs1mzl_MnAMZT1vIPLRDIMRCFt7mB.html
      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.

  • @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

  • @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

  • @harvykevincuyno6753
    @harvykevincuyno6753 7 років тому +1

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

  • @kalyankumar218
    @kalyankumar218 7 років тому

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

  • @arpanpatel5680
    @arpanpatel5680 11 років тому

    thanks but this not working in ie

  • @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')

  • @MrFrankin0
    @MrFrankin0 9 років тому

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

  • @sarabjeet605
    @sarabjeet605 10 років тому

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

  • @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.

  • @santosh-vishwakarma
    @santosh-vishwakarma 11 років тому

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

  • @koteswararaokavoori3474
    @koteswararaokavoori3474 9 років тому

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

  • @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

  • @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.

  • @loki0787
    @loki0787 12 років тому

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

  • @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

  • @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