how to get summary of content in following code
You'll need to look in $record in your foreach statement and find the content you want. (probably $record-&gt;body) Since you are polling the database manually (vs. using display_modes like teaser / full) you'll probably have to create the summary yourself.

I suggest using the truncate_utf8() function which "Truncates a UTF-8-encoded string safely to a number of characters.", it supports adding "...", word boundaries etc.

As for this "looking" into your $record var, I suggest using the Devel module, which ships with a function dpm() which can take basically any variable and output it in a pretty navigationable message on your page.