TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-07-2009, 10:04 AM   #1 (permalink)
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Default time out issues with this script

Code:
$quary = @$_GET['q'];

$query = "SELECT COUNT(id) as num FROM ph WHERE sitename LIKE '%".$quary."%' OR keywords LIKE '%".$quary."%' OR title LIKE '%".$quary."%' OR body LIKE '%".$quary."%' OR writtenby LIKE '%".$quary."%'";

while($row = mysql_fetch_array($result))
		{
	
	$post = substr($row['body'],$position,1); // Find what is the last character displaying. We find it by getting only last one character from your display message.

	if($post !=" "){ // In this step, if last character is not " "(space) do this step .

	// Find until we found that last character is " "(space) 
	// by $position+1 (14+1=15, 15+1=16 until we found " "(space) that mean character 20) 
	while($post !=" "){
	$i=1;
	$position=$position+$i;

	$post = substr($row['body'],$position,1); 
	}

	}

	$post = substr($row['body'],0,$position); // Display your message
	
	print $row['sitename'];
	echo "<br/>";
	echo $post;
	echo "...";
	echo "<br/><br/>";
	}
	?>

<?=$pagination?>

However for some reason when I type run the following "Development Blog" in q=Development Blog i get this error

Fatal error: Maximum execution time of 90 seconds exceeded in /home/example/public_html/search.php on line 202

In the ph table the column sitename has the word Development Blog, however I am getting that time out error, can any one help?
russellharrower is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Timezone Class: Dealing with Timezones the Proper Way Wildhoney General 2 01-10-2011 11:01 PM
Time Issues? Randy Absolute Beginners 6 06-11-2009 11:13 AM
Part 2: Giving our Currency Conversion Script some Responsibility Wildhoney General 15 03-17-2009 01:53 PM
Script Execution Time Class Wildhoney Script Giveaway 2 09-14-2007 11:36 PM
Calculating the Execution Time Wildhoney Tips & Tricks 0 09-14-2007 11:14 PM


All times are GMT. The time now is 12:27 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design