I would suggest you do this with your SQL rather than with PHP. However, you can do either.
With MySQL, do something like this in your query:
$query = "SELECT substring(FIELD, 0, 30) ...";
That will give you the first 30 characters from the field.
You can also do this:
$query = "SELECT substring_index(FIELD, " ", 10) ...";
That will give you the first 10 words. (using the ' ' (space) as the delimter.)
If you were to do it in PHP, you could pull the field from the database and then do something like this:
$field = mysql_result($result, 0); / get the field /
$file = substr($field, 0, 30);
That would also give you the first 30 characters of the item.
Hope this helps.
-- Jason