Linking Custom Fields to Database Records

Custom field data saved in the wp_postmeta table. Best way to access custom field is using wordpress built-in functions.

for example:

<?php
 $mykey_values = get_post_custom_values('my_key');
 foreach ( $mykey_values as $key => $value ) {
     echo "$key  => $value ('my_key')<br />";
 }
?>

0 => First value (‘my_key’)

1 => Second value (‘my_key’)

2 => Third value (‘my_key’)

You will get more information about accessing custom field in this link: http://codex.wordpress.org/Custom_Fields

you also folllow further on

http://wpshout.com/everything-wordpress-custom-fields/