i have a custom table in my drupal database.
-
I am storing records in this table with the help of a form in a custom module. Admin will add records from this form. The fields are name, date, etc.
-
Now the end users must be able to view these records in the front end of the site, in a block. It should display name field of each record and allow the users to click on the name and perform operations like voting for it.
I am done with the first task, how can i implement the second task ?
You will have to create your own module, and in that module you implement the hook_block() method to return formated html. Inside your hook_block() you are free to do whatever database query you need to generate the html.
http://api.drupal.org/api/drupal/developer–hooks–core.php/function/hook_block/6