What functionality exactly are you trying to achieve?
Itamar Tzadok
Oqallisissiat Itamar Tzadok-imit allatat
The content table is 'data_content' rather than 'data_contents'.
If you want all the records from data_content that meet the specified conditions try
$DB->get_records(
Moodle in English -> General help -> Contact Form -> Re: Contact Form
You can use the choice module as a contact form. You need to set it to anonymous. You also need to add a designated user as a teacher in the activity to have email notifications sent to that user.
The dataform can also be used for a contact form. Instead of emailing the messages I use a dataform view block in 'My Moodle' to show the list of unprocessed contact messages so I can conveniently see incoming messages on Moodle. It can be set to send a notifications through the Moodle messaging system (the designated field has not been released yet) which can also send the message to email. If your contact form is simple and small enough you can put it in a block.
It will be possible with the dataform as soon as I finish the activity grading part. This would allow you to grade by entry or as a whole.