rleahong Posted June 28, 2013 Share Posted June 28, 2013 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 } } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/ Share on other sites More sharing options...
trq Posted June 28, 2013 Share Posted June 28, 2013 You have to be kidding. See http://www.catb.org/esr/faqs/smart-questions.html Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/#findComment-1438315 Share on other sites More sharing options...
ginerjm Posted June 29, 2013 Share Posted June 29, 2013 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! Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/#findComment-1438478 Share on other sites More sharing options...
rleahong Posted August 4, 2013 Author Share Posted August 4, 2013 (edited) "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. Edited August 4, 2013 by rleahong Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/#findComment-1443430 Share on other sites More sharing options...
KevinM1 Posted August 4, 2013 Share Posted August 4, 2013 "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. Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/#findComment-1443433 Share on other sites More sharing options...
kicken Posted August 4, 2013 Share Posted August 4, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/#findComment-1443442 Share on other sites More sharing options...
rleahong Posted August 5, 2013 Author Share Posted August 5, 2013 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 } } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/#findComment-1443536 Share on other sites More sharing options...
jazzman1 Posted August 5, 2013 Share Posted August 5, 2013 (edited) Buy a new mouse or a new machine. How old is your computer? Edited August 5, 2013 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/279648-mouse-scrolling-wehn-using-this-php-code-version-2/#findComment-1443537 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.