• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Trigger

#1
[eluser]Unknown[/eluser]
Hi everyone!

I'm doing a messaging module for my CodeIgniter website.

But I have a problem.

How will I be able to update the number of messages for a current user dynamically every time a user would message him or her?

I'm thinking of having a database trigger, but I don't know how will I work on it.

Thanks!

#2
[eluser]johnpeace[/eluser]
You could have an Ajax request that runs every 15-30 seconds and looks for new notifications and updates the HTML when one is found.

#3
[eluser]Unknown[/eluser]
[quote author="johnpeace" date="1329846754"]You could have an Ajax request that runs every 15-30 seconds and looks for new notifications and updates the HTML when one is found.[/quote]

I'm still a beginner when it comes to AJAX. Do you have an idea on how to properly implement it?

#4
[eluser]Mauricio de Abreu Antunes[/eluser]
Most of the pages i have seen use iframe.
You reload your iframe (with ajax code) searching for any changes. :-)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.