$result = mysql_query("SELECT `description` FROM `users` WHERE `id` = '{$array['id']}' LIMIT 1") or die(mysql_error());
$array = mysql_fetch_assoc($result);
$description = substr(strip_tags($array['description'],0,100));
What this is doing is selecting the description field, stripping HTML out of it, and returning the first 100 characters in $description.
Instead of selecting the entire description field (which can be lengthy) and loading it into memory.. is it possible to do something similar to this in the SQL query?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Yes, that's one of the things I was looking for, thanks.
However, doing SUBSTRING() wouldn't really be of use, because lets say i select the first 1000 characters.... those could all be a stylesheet, and the actual characters i'm looking for would be after that.
I guess I'll have to stick with loading it all into an array and then freeing it as soon as possible.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Could you not make a plain_description field and insert both the description and strip_tags'ed description? Would use up more space on your db but improve the speed. Choice between the two!