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
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.
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! 😊
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
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.
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! 😊
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
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 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
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.
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!
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)
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.
@@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.
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.
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.
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! 😊
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.
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.
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! 👍
@@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😉
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! 😉👍
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.
thank you sir, this video helped me a lot!
Awesome!!! You're welcome...
Penyampaian yang praktis dan mudah difahami, GOOD !
The power of JavaScript❤️
THANKS BRO❤️❤️❤️
You're welcome!!! Thank you for watching...
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
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.
Thanks! Will the display be updated when a row is deleted?
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! 😊
Thank you a lot i have enjoy your course 🥰
Hi @raymondmoundzele4907,
I'm glad to hear you enjoyed the course! 🥰 You're very welcome!
Thanks for this video well explained
You're welcome! Glad to hear that from you, thanks for watching.
You Just saved my day. thank you
You're very welcome! Thanks for watching...
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
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.
How can i add refresh with delay every 2 second
And thanks
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! 😊
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,
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
Will the website freeze as the number of users increases? thanks
Probably no
i tested it but unfortunately the page froze :(
@@websinifi i having an headache myself, using this way, wasting a lot of bandwith
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..
got a Solution ?
@@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
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.
just fetch the data in descending order
@@rizaldwiky4957 ya bener banget nih
I want to add search filter
And after it reload the filter is not working
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.
Using setInterval 1s, doesnt overload the page i the long run?
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!
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)
Amazing bro
Hi @bababibababu,
Thank you so much! 😀 I appreciate your support!
Thank you for this!
You're very welcome!!! Thanks for watching.
ini harus di refresh kan baru ada perubahan?
Enggak, itu berubah secara real time tanpa di refresh
@@DavidGTech kok saya rubah di filesystem php nya dia g rubah
Coba cek lagi dah kodenya, mungkin ada kode yang salah/kurang lengkap, biasanya sih gitu. Kalau mau cepet langsung aja copas dari source codenya
@@DavidGTech wah kalo memang bisa berarti isi seperti firebase dong? Ada perubahan di database realtime tanoa reload?
Di websitenya iya real time, kalau di databasenya enggak, karena kan yang di websitenya udah diatur sama JavaScript dan PHP
Thanks another one down
You're welcome! Thanks for watching...
better pakai socket gasih? kalau datanya gede bakal hit server tiap 1ms sedapp jugak 😄
Bang tutor websocket dimana ya yang mudah di mengerti
mantap min xixixixi,,,,,
Thanks
Hi @socialmediadesignertg9805,
You're welcome! 😊 Glad I could help!
Don't understand the concept of such Videos with background music and not a single word being said :-(
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.
nice thx
Thank you for watching!
@@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.
but u just killed mysql performance.
Pls give better solution?
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.
Not working on me so sad
I advice you to use the source code, because probably there are some codes that missing in your code
@@DavidGTech I just figured it out sir. There is something missing in my code. Thank you so much
You're welcome
2:30 I Like How IDE Recommended xxx LOL
Thanks for watching!
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.
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! 😊
source code test on real server, but no update, all the same, for me not wrok
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.
bang minta source codenya dong hehe
Minta source code full ya bg
Source Code = drive.google.com/drive/folders/1J0jK28Zw2gymLQgdPDQjsB0NDfkNIa1g?usp=sharing
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.
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! 👍
@@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😉
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! 😉👍
please make use mongodb
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.
This is bad practice
Can you provide specific details on what you think is bad practice?
@@DavidGTech Because you're overwhelming the server with setInterval with 1ms
Thanks
You're welcome! Thank you for watching...
thanks
You're very welcome! Thanks for watching!
thank you
Hi @MasterViewerCompony,
Thank you so much! 😊 I'm glad you enjoyed the video. Your support means a lot! 🥇