Real Time Data Display Using JavaScript & PHP MySQL | Update Page & Get Data Without Refresh Page

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

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

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

    thank you sir, this video helped me a lot!

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว

      Awesome!!! You're welcome...

  • @indrarahadian2687
    @indrarahadian2687 2 หลายเดือนก่อน

    Penyampaian yang praktis dan mudah difahami, GOOD !

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

    The power of JavaScript❤️
    THANKS BRO❤️❤️❤️

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      You're welcome!!! Thank you for watching...

  • @danidan2235
    @danidan2235 2 ปีที่แล้ว +6

    So this is Vanilla Javascript? Can you do one with pagination (let's say 10 rows per page only) and also refreshing the page only when there's a new addition, update or deletion? Thanks

    • @DavidGTech
      @DavidGTech  ปีที่แล้ว +1

      To address your request, I'll definitely consider creating a new video that demonstrates how to implement pagination with 10 rows per page and refreshing the page only when there's a new addition, update, or deletion in the database.

  • @DanielViteripixplanet
    @DanielViteripixplanet 7 หลายเดือนก่อน +1

    Thanks! Will the display be updated when a row is deleted?

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน +1

      Hi @DanielViteripixplanet,
      Yes, the display will be updated when a row is deleted. You can use JavaScript to dynamically update the table and reflect the changes without refreshing the page. Hope this helps! 😊

  • @raymondmoundzele4907
    @raymondmoundzele4907 7 หลายเดือนก่อน +1

    Thank you a lot i have enjoy your course 🥰

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @raymondmoundzele4907,
      I'm glad to hear you enjoyed the course! 🥰 You're very welcome!

  • @raymondmoundzele4907
    @raymondmoundzele4907 ปีที่แล้ว +1

    Thanks for this video well explained

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

      You're welcome! Glad to hear that from you, thanks for watching.

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

    You Just saved my day. thank you

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      You're very welcome! Thanks for watching...

  • @gudangbmnpalu5494
    @gudangbmnpalu5494 2 ปีที่แล้ว +1

    mantap bang ...video seprt bgni nih yg ane demen....serg2 update bang....
    maklm ane mash newbie...mash perl banyk beljr....
    sukses selalu...semakin nambah subscribny...
    o iya bang mau nany klo untuk buat semacam tombol like itu gmn yah??...jadi semcm tombol subsribe trs klo di klik keliatan brp yg suka...thanks bang

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      Siappp, makasih banyak nih udah nonton.
      Kalau buat tombol semacam like itu bisa sih, rencana nanti emang mau buat videonya sih tapi masih gatau kapan, pokoknya pasti panjang gitu soalnya harus ada sessionnya gitu dan databasenya, dan ada javascriptnya juga.

  • @iiutmangr
    @iiutmangr 6 หลายเดือนก่อน +2

    How can i add refresh with delay every 2 second
    And thanks

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @iiutmangr,
      To add a refresh with a delay every 2 seconds, you can use setInterval in your JavaScript code like this:
      setInterval(function() {
      location.reload();
      }, 2000);
      This will refresh the page every 2 seconds. Hope this helps! 😊

  • @uphan_aja
    @uphan_aja 2 ปีที่แล้ว +1

    Ini bermasalah gak ya sama kinerja RAM server, ketika contoh kasusnya ada ribuan user yg lagi buka page itu dan data yg ditampilkan dah banyak banget,

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว

      Kalau yang saya lihat dari banyak komentar orang2, beratnya itu karena ngerefresh page yang dituju setiap 0 detik, mungkin solusinya bisa ditambahin durasi detiknya kaya 10-30 detik

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

    Will the website freeze as the number of users increases? thanks

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว

      Probably no

    • @websinifi
      @websinifi 2 ปีที่แล้ว +1

      i tested it but unfortunately the page froze :(

    • @notjustirvan
      @notjustirvan ปีที่แล้ว +1

      @@websinifi i having an headache myself, using this way, wasting a lot of bandwith

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

    The problem with this code is that, if you have large data you scroll down to the bottom, if someone inserted new data the whole table will refresh and bring you back on top..

    • @EquationOcean17
      @EquationOcean17 2 ปีที่แล้ว +1

      got a Solution ?

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

      @@EquationOcean17 akalin aja pke jquery load page focus di tablenya aja jgn di section , trus di set timer 10-30 detik delay biar ga berat ke servernya

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

      I have solutions for that just do display flex to table and add column- reverse property so you can get last order first.hope this will help.

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

      just fetch the data in descending order

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

      @@rizaldwiky4957 ya bener banget nih

  • @HowsMyDriving-z3i
    @HowsMyDriving-z3i 8 หลายเดือนก่อน +1

    I want to add search filter
    And after it reload the filter is not working

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @user-ry7gl2mv4x! To add a search filter that persists after a page reload, you can use JavaScript to save the filter state in local storage or the URL parameters. This way, the filter settings are retained even after the page is reloaded.

  • @maxgamerov
    @maxgamerov 5 หลายเดือนก่อน

    Using setInterval 1s, doesnt overload the page i the long run?

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @maxgamerov,
      Good point! ⏲️ Using setInterval with a 1-second interval can be resource-intensive over time. To avoid overloading, consider optimizing the code or using setTimeout with conditional logic to manage updates more efficiently. Thanks for bringing this up!

    • @suleimanabdullahi3190
      @suleimanabdullahi3190 2 หลายเดือนก่อน

      Add more seconds
      1= 0.001 seconds
      so for 1 second it will be 1000,but it's still resource intensive. 2000 which is 2 secs will do,i.e,
      setInterval(function(){
      cards();
      },2000)

  • @bababibababu
    @bababibababu 6 หลายเดือนก่อน +1

    Amazing bro

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @bababibababu,
      Thank you so much! 😀 I appreciate your support!

  • @josellecallora08
    @josellecallora08 ปีที่แล้ว +1

    Thank you for this!

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

      You're very welcome!!! Thanks for watching.

  • @muhammadsofyansyah9571
    @muhammadsofyansyah9571 2 ปีที่แล้ว +1

    ini harus di refresh kan baru ada perubahan?

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      Enggak, itu berubah secara real time tanpa di refresh

    • @muhammadsofyansyah9571
      @muhammadsofyansyah9571 2 ปีที่แล้ว +1

      @@DavidGTech kok saya rubah di filesystem php nya dia g rubah

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว

      Coba cek lagi dah kodenya, mungkin ada kode yang salah/kurang lengkap, biasanya sih gitu. Kalau mau cepet langsung aja copas dari source codenya

    • @muhammadsofyansyah9571
      @muhammadsofyansyah9571 2 ปีที่แล้ว +1

      @@DavidGTech wah kalo memang bisa berarti isi seperti firebase dong? Ada perubahan di database realtime tanoa reload?

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      Di websitenya iya real time, kalau di databasenya enggak, karena kan yang di websitenya udah diatur sama JavaScript dan PHP

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

    Thanks another one down

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      You're welcome! Thanks for watching...

  • @mikhacavin8779
    @mikhacavin8779 2 ปีที่แล้ว +1

    better pakai socket gasih? kalau datanya gede bakal hit server tiap 1ms sedapp jugak 😄

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

      Bang tutor websocket dimana ya yang mudah di mengerti

  • @aelfina2736
    @aelfina2736 2 ปีที่แล้ว +1

    mantap min xixixixi,,,,,

  • @socialmediadesignertg9805
    @socialmediadesignertg9805 6 หลายเดือนก่อน +1

    Thanks

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @socialmediadesignertg9805,
      You're welcome! 😊 Glad I could help!

  • @vgupta4760
    @vgupta4760 ปีที่แล้ว +1

    Don't understand the concept of such Videos with background music and not a single word being said :-(

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

      Thanks for your comment. I'm sorry that you found the video difficult to understand. I'll take your feedback on board and work on incorporating more explanations and voiceover in future tutorials.

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

    nice thx

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      Thank you for watching!

    • @Schorsch180
      @Schorsch180 2 ปีที่แล้ว

      @@DavidGTech this script reloads the page every second right? isn't that a high server load? because if I mark the text, the mark is gone immediately, so every second a reload, right? can you also make an extension that you can enter with a form and the page only updates when you have sent the form? that would be nice.

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

    but u just killed mysql performance.

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

      Pls give better solution?

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

      Thanks for your comment. Can you please provide more details on how I killed MySQL performance? I'm always looking to improve my content and welcome constructive feedback.

  • @jasonsolomon8672
    @jasonsolomon8672 2 ปีที่แล้ว +1

    Not working on me so sad

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      I advice you to use the source code, because probably there are some codes that missing in your code

    • @jasonsolomon8672
      @jasonsolomon8672 2 ปีที่แล้ว +3

      @@DavidGTech I just figured it out sir. There is something missing in my code. Thank you so much

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว

      You're welcome

  • @ahmedellayeh1540
    @ahmedellayeh1540 ปีที่แล้ว +1

    2:30 I Like How IDE Recommended xxx LOL

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

      Thanks for watching!

  • @seanodotcom
    @seanodotcom 7 หลายเดือนก่อน

    Using a setInterval of 1? As in 1ms?!!
    YIKES. This code would hammer your database with 1000 requests EVERY SECOND -- it is horrible practice.
    Please, no one do this.

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @seanodotcom,
      You’re absolutely right! Using a setInterval of 1ms would indeed hammer your database with an excessive number of requests. It's important to use a more reasonable interval to avoid overwhelming your server. Thanks for pointing that out! 😊

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

    source code test on real server, but no update, all the same, for me not wrok

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

      I'm sorry to hear that you're still experiencing issues even after trying the source code on a real server. Can you please provide me with more details about the problem you're encountering? This will help me better understand the issue and provide more specific guidance on how to resolve it.

  • @umbrellaphotograph1006
    @umbrellaphotograph1006 23 วันที่ผ่านมา

    bang minta source codenya dong hehe

  • @busrajunihendru7688
    @busrajunihendru7688 2 ปีที่แล้ว +1

    Minta source code full ya bg

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว +1

      Source Code = drive.google.com/drive/folders/1J0jK28Zw2gymLQgdPDQjsB0NDfkNIa1g?usp=sharing

  • @prabhakaranj1218
    @prabhakaranj1218 4 หลายเดือนก่อน

    Bro you are making the server to engage with the database all the time. Other transactions will get into deadlock and fail. Not recommended for even beginners.

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน

      Hi @prabhakaranj1218,
      Thank you for your feedback! 🙏 You're right; constant server-database engagement can lead to performance issues and potential deadlocks. ⚠️ For those looking to implement a more robust solution, considering asynchronous requests and database optimization techniques is crucial. 🔄 I'll make sure to highlight these considerations in future videos. Appreciate your insight! 👍

    • @prabhakaranj1218
      @prabhakaranj1218 4 หลายเดือนก่อน +1

      @@DavidGTech
      The way you have explained is pretty inspiring. You showed the easiest way to achieve this. Anyways this one I have implemented on a signal from the server. Thanks for that😉

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน +1

      Thank you so much for your kind words @prabhakaranj1218! 😊 I'm glad to hear you found the explanation inspiring and easy to follow. It's great to know you've implemented it successfully on a server signal. Keep up the good work! 😉👍

  • @sukmawijaya1348
    @sukmawijaya1348 2 ปีที่แล้ว

    please make use mongodb

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

      Using MongoDB for real-time data display is an excellent idea, and it's a popular NoSQL database that can complement the content of the current video. I'll definitely consider creating a new video that demonstrates how to achieve real-time data display using JavaScript, PHP, and MongoDB.

  • @baijidhossain1541
    @baijidhossain1541 ปีที่แล้ว +1

    This is bad practice

    • @DavidGTech
      @DavidGTech  ปีที่แล้ว +1

      Can you provide specific details on what you think is bad practice?

    • @GustavoRodriguez-gm5jq
      @GustavoRodriguez-gm5jq ปีที่แล้ว +1

      @@DavidGTech Because you're overwhelming the server with setInterval with 1ms

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

    Thanks

    • @DavidGTech
      @DavidGTech  2 ปีที่แล้ว

      You're welcome! Thank you for watching...

  • @junait_islam
    @junait_islam ปีที่แล้ว +1

    thanks

    • @DavidGTech
      @DavidGTech  ปีที่แล้ว +1

      You're very welcome! Thanks for watching!

  • @MasterViewerCompony
    @MasterViewerCompony 4 หลายเดือนก่อน +1

    thank you

    • @DavidGTech
      @DavidGTech  4 หลายเดือนก่อน +1

      Hi @MasterViewerCompony,
      Thank you so much! 😊 I'm glad you enjoyed the video. Your support means a lot! 🥇