Pull featured image using SQL in Wordchimp plugin

Closed - This job posting has been filled and work has been completed.

Job Description

The Wordchimp Wordpress plugin has a PHP file where all actions are executed.

The code pulls in data from the wp_posts table using SQL. I also need Featured Image data to be pulled in but this data is not stored in that table.

Here is the relevant PHP code in Wordchimp: http://pastebin.com/E0Qgep4e

I think this is the code to add a featured image or maybe there is another way:

$Featured_image = $wpdb->get_results("
FROM net_5_postmeta AS pm
INNER JOIN net_5_posts AS p ON pm.meta_value=p.ID
WHERE pm.post_id = $da_id
AND pm.meta_key = '_thumbnail_id'
ORDER BY p.post_date DESC

The task is simply to add in the featured image data with the post excerpt data. That's it.

I can give more specific details by chat. If you have gchat, that is preferred.