Jump to content

Recommended Posts

 THE MOUSE IS SCROLLING WHEN CODE IS ADDED IN INNER LOOP BELOW THE

$ORDER OBJECT

 

 

<?php
     PRINT_ROYALTY_ORDERS();
  function PRINT_ROYALTY_ORDERS(){
         
         $hostname       ="localhost";
            $password       ="";
            $username       ="root";
            $CON            =mysql_connect ($hostname, $username, $password) ;
            mysql_select_db("reggaedbf", $CON);
            $SQLALBUM = " SELECT * FROM ALBUM ";
            $FALBUM   = mysql_query( $SQLALBUM, $CON );
             while ( $ALBUM = mysql_fetch_object( $FALBUM )){
                            $ALBUMCOD = $ALBUM->ALBUMCOD;
                            $ALBUMNAM = $ALBUM->ALBUMNAM;

############################################################################
                        ?>
                  <TABLE WIDTH="700">
                  <TR>
                             <TH BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " ORDER NO. "    )  ?></FONT></B></TH>
                             <TH BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( " ORDER DATE "   )  ?></FONT></B></TH>
                             <TH BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " ACCOUNT NAME " )  ?></FONT></B></TH>
              <TH BGCOLOR="#00FFFF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( " STREET "       )  ?></FONT></B></TH>
              <TH BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " COUNTRY "      )  ?></FONT></B></TH>
                             <TH BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( " STATE "        )  ?></FONT></B></TH>
                             <TH BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " CITY  "        )  ?></FONT></B></TH>
               </TR>
                     <?php

 

#############################################################################

              $SQLORDERS = " SELECT * FROM ORDERS ";
              $SQLORDERS.= " WHERE   ITEMNO=" . $ALBUMCOD;
              $FORDERS = mysql_query( $SQLORDERS, $CON );
              $MATCHES   = mysql_num_rows( $FORDERS );
              if ( $MATCHES == 0 ){
              }
              else {
    
                           while ( $ORDER = mysql_fetch_object( $FORDERS )){
                                        $ACCOUNT_NAME=$ORDER->ACCOUNT_NAME;
                                        $ORDDAT           = $ORDER->ORDDAT;
                                        $COUNTRYCOD = $ORDER->COUNTRYCOD;
                                        $STATECOD       = $ORDER->STATECOD;
                                        $CITYCOD          = $ORDER->CITYCOD;
                                        $STREET            = $ORDER->STREET;
                                        $AMOUNT           = $ORDER->AMOUNT;
                                        $ORDERNO   = $ORDER->ORDERNO;
                                        $SQLCOUNTRY = " SELECT * FROM COUNTRY ";
                                        $SQLCOUNTRY.= " WHERE  COUNTRYCOD=" . $COUNTRYCOD;
                                        $FCOUNTRY   = mysql_query( $SQLCOUNTRY, $CON );
                                        $MATCHES    = mysql_num_rows( $FCOUNTRY );
                                         if ( $MATCHES == 0 ){
                                         }
                                         else {
                                                      $ROW        = mysql_fetch_array($FCOUNTRY );
                                                      $COUNTRYNAM = $ROW["COUNTRYNAM"];
                                           }
                                           $SQLSTATES = " SELECT * FROM STATEFIL ";
                                           $SQLSTATES.= " WHERE  COUNTRYCOD=" . $COUNTRYCOD ;
                                           $SQLSTATES.= " AND      STATECOD=" . $STATECOD;
                                           $FSTATES   = mysql_query( $SQLSTATES, $CON );
                                           $ROW       = mysql_fetch_array($FSTATES );
                                           $STATENAM  = $ROW["STATENAM"];
                                           $SQLCITIES = " SELECT * FROM CITYFIL ";
                                           $SQLCITIES.= " WHERE  COUNTRYCOD=" . $COUNTRYCOD ;
                                           $SQLCITIES.= " AND      STATECOD=" . $STATECOD;
                                           $SQLCITIES.= " AND       CITYCOD=" . $CITYCOD;
                                           $FCITY     = mysql_query( $SQLCITIES, $CON );
                                           $ROW       = mysql_fetch_array($FCITY );
                                           $CITYNAM   = $ROW["CITYNAM"];

###############################################################################
                                  ?>
              <TR>
                             <TD BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $ORDERNO      )  ?></FONT></B></TD>
                             <TD BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( $ORDERDATE    )  ?></FONT></B></TD>
                             <TD BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $ACCOUNT_NAME )  ?></FONT></B></TD>
              <TD BGCOLOR="#00FFFF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( $STREET       )  ?></FONT></B></TD>
              <TD BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $COUNTRYNAM   )  ?></FONT></B></TD>
                             <TD BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( $STATENAM     )  ?></FONT></B></TD>
                             <TD BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $CITYNAM      )  ?></FONT></B></TD>
              </TR>
############################################################################

                     <?php                                 
         
                          }
        ?>
        </TABLE>
        <?php
                }
         }
  }

 ?>

 

 

OP: Something I just have to ask. Whatever do you MEAN when you say "the mouse is scrolling"? Could it be that your code is just generating so much data that your page is just spitting out line after line after line?

 

trq: love that link!

  • 1 month later...

"when I say , mouse is scrolling " I mean for example

 

 

 

the mouse is scrolling when many applications are in the processor queue or when application occupies most of memory.

 

Still vague.

 

And, next time, please put any code you post here in


tags.  You can do it easily by clicking on the <> button on our editor.

My best guess at what you mean by the mouse is scrolling is that you get a busy cursor like the application froze. Beyond that I don't really have any idea what you mean. I see you are doing queries within loops which you should not be doing, use a JOIN instead. Perhaps that will solve your problem.

OP: Something I just have to ask. Whatever do you MEAN when you say "the mouse is scrolling"? Could it be that your code is just generating so much data that your page is just spitting out line after line after line?

 

trq: love that link!

 

 THE MOUSE IS SCROLLING WHEN CODE IS ADDED IN INNER LOOP BELOW THE

$ORDER OBJECT

 

 

<?php

     PRINT_ROYALTY_ORDERS();

  function PRINT_ROYALTY_ORDERS(){

         

         $hostname       ="localhost";

            $password       ="";

            $username       ="root";

            $CON            =mysql_connect ($hostname, $username, $password) ;

            mysql_select_db("reggaedbf", $CON);

            $SQLALBUM = " SELECT * FROM ALBUM ";

            $FALBUM   = mysql_query( $SQLALBUM, $CON );

             while ( $ALBUM = mysql_fetch_object( $FALBUM )){

                            $ALBUMCOD = $ALBUM->ALBUMCOD;

                            $ALBUMNAM = $ALBUM->ALBUMNAM;

############################################################################

                        ?>

                  <TABLE WIDTH="700">

                  <TR>

                             <TH BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " ORDER NO. "    )  ?></FONT></B></TH>

                             <TH BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( " ORDER DATE "   )  ?></FONT></B></TH>

                             <TH BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " ACCOUNT NAME " )  ?></FONT></B></TH>

              <TH BGCOLOR="#00FFFF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( " STREET "       )  ?></FONT></B></TH>

              <TH BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " COUNTRY "      )  ?></FONT></B></TH>

                             <TH BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( " STATE "        )  ?></FONT></B></TH>

                             <TH BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( " CITY  "        )  ?></FONT></B></TH>

               </TR>

                     <?php

 

#############################################################################

              $SQLORDERS = " SELECT * FROM ORDERS ";

              $SQLORDERS.= " WHERE   ITEMNO=" . $ALBUMCOD;

              $FORDERS = mysql_query( $SQLORDERS, $CON );

              $MATCHES   = mysql_num_rows( $FORDERS );

              if ( $MATCHES == 0 ){

              }

              else {

    

                           while ( $ORDER = mysql_fetch_object( $FORDERS )){

                                        $ACCOUNT_NAME=$ORDER->ACCOUNT_NAME;

                                        $ORDDAT           = $ORDER->ORDDAT;

                                        $COUNTRYCOD = $ORDER->COUNTRYCOD;

                                        $STATECOD       = $ORDER->STATECOD;

                                        $CITYCOD          = $ORDER->CITYCOD;

                                        $STREET            = $ORDER->STREET;

                                        $AMOUNT           = $ORDER->AMOUNT;

                                        $ORDERNO   = $ORDER->ORDERNO;

                                        $SQLCOUNTRY = " SELECT * FROM COUNTRY ";

                                        $SQLCOUNTRY.= " WHERE  COUNTRYCOD=" . $COUNTRYCOD;

                                        $FCOUNTRY   = mysql_query( $SQLCOUNTRY, $CON );

                                        $MATCHES    = mysql_num_rows( $FCOUNTRY );

                                         if ( $MATCHES == 0 ){

                                         }

                                         else {

                                                      $ROW        = mysql_fetch_array($FCOUNTRY );

                                                      $COUNTRYNAM = $ROW["COUNTRYNAM"];

                                           }

                                           $SQLSTATES = " SELECT * FROM STATEFIL ";

                                           $SQLSTATES.= " WHERE  COUNTRYCOD=" . $COUNTRYCOD ;

                                           $SQLSTATES.= " AND      STATECOD=" . $STATECOD;

                                           $FSTATES   = mysql_query( $SQLSTATES, $CON );

                                           $ROW       = mysql_fetch_array($FSTATES );

                                           $STATENAM  = $ROW["STATENAM"];

                                           $SQLCITIES = " SELECT * FROM CITYFIL ";

                                           $SQLCITIES.= " WHERE  COUNTRYCOD=" . $COUNTRYCOD ;

                                           $SQLCITIES.= " AND      STATECOD=" . $STATECOD;

                                           $SQLCITIES.= " AND       CITYCOD=" . $CITYCOD;

                                           $FCITY     = mysql_query( $SQLCITIES, $CON );

                                           $ROW       = mysql_fetch_array($FCITY );

                                           $CITYNAM   = $ROW["CITYNAM"];

###############################################################################

                                  ?>

              <TR>

                             <TD BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $ORDERNO      )  ?></FONT></B></TD>

                             <TD BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( $ORDERDATE    )  ?></FONT></B></TD>

                             <TD BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $ACCOUNT_NAME )  ?></FONT></B></TD>

              <TD BGCOLOR="#00FFFF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( $STREET       )  ?></FONT></B></TD>

              <TD BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $COUNTRYNAM   )  ?></FONT></B></TD>

                             <TD BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php  echo( $STATENAM     )  ?></FONT></B></TD>

                             <TD BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php  echo( $CITYNAM      )  ?></FONT></B></TD>

              </TR>

############################################################################

                     <?php                                 

         

                          }

        ?>

        </TABLE>

        <?php

                }

         }

  }

 ?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.