PHP - Moved: Time Query Help
This topic has been moved to MySQL Help.
http://www.phpfreaks.com/forums/index.php?topic=327525.0 Similar TutorialsThis topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=316461.0 Hey all. I have a query that selects data from a datbase based on a criteria. Easy enough. But now I am growing and the amount displaying is too much. How can you, via php, have a queries result be displayed only so many at a time and auto create links that show the rest? Like if query returns 82 results, I want it to display 25 immediately and create 3 links at the bottom. The next link would show 26-50. The next 51-75. And the final 76-82. etc Example: Code: [Select] $result = mysql_query("SELECT * FROM pay"); $num_rows = mysql_num_rows($result); while($row = mysql_fetch_array($result)) { echo $row['first_name']; echo $row['last_name']; echo $row['item_name']; echo $row['option_selection1']; echo $row['payment_date']; echo $row['stat']; } This is simple. But what happens when the results are 125? I want to limit it to displaying 25 at a time. Is the only way to manually create seperate pages and have each one show 1-25, then 26-50, etc? Or is there a way to have the script do it, itself? Any tutorials out there on this specifically? Hopefully I am making sense. Thanks! Hello, I need to interrupt the execution of an oracle query if it is taking more than 10 seconds, and give user a message informing him about execution timeout. I googled a lot but i didn't find anything useful. Is there any way to set a time limit to oci_execute. I cannot modify DB settings... Any Idea? Thnks Is there any simple way I can log the execution time of each mysql query that is executed on a page, maybe with a register shutdown function, I have been trying to profile and reduce execution time of the CRM / tracking system at work and have used a register shutdown function to log page execution time. We were unsure of wither it was the internet connection, browsers having a hard time rendering nested tables(the code is OLD), or mysql queries taking too long to execute. Yesterday I started re-coding a script and I got to a query, it returned one row/field and had a limit 1, but it searched for an md5 has in the where clause, as soon as I added this query in my re-code it took execution time from 1s to 13s, I ran the query in phpmyadmin and the execution time was 0.5s, this was running in a loop which returned about 20 rows, I added an index on the md5 hash field and the query then took 0.0005s to load, I now want to do this for all scripts on the system. Any ideas? Thanks // EDIT, please note that I don't have shell access, I only have access to the scripts, plesk panel and PHPmyadmin This topic has been moved to PHP Math Help. http://www.phpfreaks.com/forums/index.php?topic=328102.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=314226.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=315056.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=355963.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=310181.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=316616.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=306905.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=321950.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=348274.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=329559.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=344191.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=311010.0 This topic has been moved to Editor Help (Dreamweaver, Zend, etc). http://www.phpfreaks.com/forums/index.php?topic=322054.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=306079.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=353002.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=319016.0 |