How to set/display select options in selectbox using form-api I have created a form to allow users to enter some details but I also need to display some mysql data into that form. The contents and fields of the form are displayed in a tabular format. I just want to know the right way to display mysql data in one of the table columns along with the form fields. 
How can i display select options in selectbox using form-api ?
You can make use of theme_table to make a table view. 
You can use form-api inside the table as you wish.

Sample code for creating table. 

$header = array();
$rows = array();
$rows[] = array(
    array('data' =&gt; 'Head1', 'rowspan'=&gt; 2, 'header' =&gt; 1),
    array('data' =&gt; 'Head2', 'rowspan'=&gt; 2, 'header' =&gt; 1),
    array('data' =&gt; 'Head3', 'rowspan'=&gt; 2, 'header' =&gt; 1),
    array('data' =&gt; 'Head4', 'rowspan'=&gt; 2, 'header' =&gt; 1),
    array('data' =&gt; 'Head5', 'rowspan'=&gt; 2, 'header' =&gt; 1),
    array('data' =&gt; 'Head6', 'colspan'=&gt; 6, 'header' =&gt; 1),
);
$rows[] = array(
    array('data' =&gt; 'SubHead6-1', 'header' =&gt; 1),
    array('data' =&gt; 'SubHead6-2', 'header' =&gt; 1),
    array('data' =&gt; 'SubHead6-3', 'header' =&gt; 1),
    array('data' =&gt; 'SubHead6-4', 'header' =&gt; 1),
    array('data' =&gt; 'SubHead6-5', 'header' =&gt; 1),
    array('data' =&gt; 'SubHead6-6', 'header' =&gt; 1),
);


return  $output .= theme('table', $header, $rows);

To make a select box with db values you can try this 

$query = "SELECT * FROM {tablemanme}";
$query_result =  db_query($query);
while (($data = db_fetch_object($query_result )) !== FALSE) {
  $opt[$data-&gt;id] = $data-&gt;name;
}

$form['select'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; $opt,
);


Good luck.