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 812285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:10:47+00:00 2026-05-15T01:10:47+00:00

I am having problems implementing my PHP/MySQL code into a jgrowl. If you are

  • 0

I am having problems implementing my PHP/MySQL code into a jgrowl.

If you are familiar with jgrowl you will know it delivers notifications like Growl does for OS X.

I am trying to get it read all the records from my table but at the moment it is only displaying one record as a notification and it loops through it 4 times.

Another problem is that if I have 5 rows in the table then jgrowl will only display 4 notifications are going to be viewed.

How do I get it to view all the records in the table as notifications and how do I display the total number of records (5) as notifications and account for the missing one at the moment?

        <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 < <?php echo $totalRows_comment; ?> ) {

                    <?php

                    echo '$.jGrowl("'.$row_comment['comment'].'",';

                                 ?>

                                 {
                            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-15T01:10:48+00:00Added an answer on May 15, 2026 at 1:10 am

    Your problem is definitely not in fetching rows.
    All these problems grows from the same root: an unclear goal. What javascript code you want to get?

    You have to divide your job into 2 parts and done them separately:

    1. Apart from PHP and MySQL write your Growl or whatever code and and debug it until it gets to work. Every bit of data must be hardcoded, just like there is no PHP and mysql at all and your data is static.

    2. Once you get (1) to work, the easiest part will remain: just write a PHP/MySQL code that generates exact copy of your javascript code. Not a big deal.

    That’s all.
    Just don’t sit between 2 stools.
    Hope this helps

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

Sidebar

Ask A Question

Stats

  • Questions 433k
  • Answers 433k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer select C.ACCOUNTNO, C.CONTACT, C.KEY1, C.KEY4, HichschoolCS.State as HighSchool, TestSatCS.state as… May 15, 2026 at 2:55 pm
  • Editorial Team
    Editorial Team added an answer Use jQGrid plugin. I can bet you will love it.… May 15, 2026 at 2:55 pm
  • Editorial Team
    Editorial Team added an answer Edit Even better than the previous solution is simply to… May 15, 2026 at 2:55 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.