Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 805865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:09:23+00:00 2026-05-15T00:09:23+00:00

On my database I am planning to create a table storing messages to alert

  • 0

On my database I am planning to create a table storing messages to alert users of anything they need to do.

I am looking at using a jQuery growl like notification method but I’m confused at how I would begin building it.

The data would be added into the database using the standard MySQL insert method from a form but how would I select messages from the database to display using the jQuery growl.

Would this require the use of AJAX?

This is the JavaScript code I have so far, i was wondering how I would implement the PHP code alongside it so that I can pull out data from my tables to display as notifications:

        <script type="text/javascript"> 

    // In case you don't have firebug...
    if (!window.console || !console.firebug) {
        var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
        window.console = {};
        for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {};
    }

    (function($){

        $(document).ready(function(){

            // This specifies how many messages can be pooled out at any given time.
            // If there are more notifications raised then the pool, the others are
            // placed into queue and rendered after the other have disapeared.
            $.jGrowl.defaults.pool = 5;

            var i = 1;
            var y = 1;

            setInterval( function() {
                if ( i < 3 ) {
                    $.jGrowl("Message " + i, {
                        sticky:         true,
                        log:            function() {
                            console.log("Creating message " + i + "...");
                        },
                        beforeOpen:     function() {
                            console.log("Rendering message " + y + "...");
                            y++;
                        }
                    });
                }

                i++;
            } , 1000 );

        });
    })(jQuery);

    </script>                     
                <p>

</span>
<p>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:09:24+00:00Added an answer on May 15, 2026 at 12:09 am

    PHP is running on the server and JavaScript is running on the client.

    So Yeah, you’ll need AJAX.

    Well, there would be other ways, but they are more work than simply setting up AJAX. Especially so since you work with jQuery which handles most of the AJAX stuff for you.

    Let it call a small PHP script that fetches the Rows from the DB, outputs them in your preferred Way (XML or JSON) and exits.

    The usual jQuery AJAX tutorials should cover exactly that.

    If your App is Multi-User don’t forget to send a UserID in the Request so PHP knows what Rows to pull.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which Database table Schema is more efficient and why? Users (UserID, UserName, CompamyId) Companies
I am planning to create a web application using spring/hibernate. How should I design
We're planning to move a SQL 2000 database to SQL 2005, and I am
Database? Page variables? Enum? I'm looking for opinions here.
The Database Tuning Advisor is recommending that I create a bunch of statistics in
This database will store a list of children. But the problem is, they will
I am planning to create a pricing matrix for a project in Rails. It's
A database application that I'm currently working on, stores all sorts of settings in
What database should a beginner use in the C language? Can I use MySQL?
Many database systems don't allow comments or descriptions of tables and fields, so how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.