Subscribe For Free Updates!

We'll not spam mate! We promise.

Mar 3, 2013

Set Time limit for a php script.


Set Time limit for a php script.
If you want to extend the execution time of the script you can use set_time_limit on the page.
The default time limit is 30 seconds


<?php
// script dies after 180 secs
set_time_limit(180);
?>

/**********************************************/
Get random values from database.


SELECT * FROM test_table ORDER BY RAND() limit 20;



This query will return values 20 rows randomly. To make more effecient the random values can be given in the server side scripting language.
/*********************************************************/


TechniqZone Socializer Widget
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment