you can use schema module to generate the install file contents.<br><br><div class="gmail_quote">On Thu, Mar 17, 2011 at 9:14 AM, Austin Einter <span dir="ltr"><<a href="mailto:austin.einter@gmail.com">austin.einter@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Hi All</div>
<div>I have a small install file as below.</div>
<div> </div>
<div>
<div><i><font color="#000099"><?php<br>function resume_submit_install() <br>{<br> drupal_install_schema('resume_table');<br>}<br>function resume_submit_uninstall() <br>{<br> drupal_uninstall_schema('resume_table');<br>
}<br>function resume_table_schema() <br>{<br> $schema['resume_table'] = array(<br> <br> 'fields' => array(<br> 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),<br>
'name' => array('type' => 'varchar', 'not null' => TRUE, 'default' => ''),<br> 'email' => array('type' => 'varchar', 'not null' => TRUE, 'default' => ''),<br>
'altemail' => array('type' => 'varchar', 'not null' => TRUE, 'default' => ''),<br> ),<br> <br> 'indexes' => array('uid' => array('uid'),),<br>
<br> 'primary key' => array('name'),<br> );</font></i></div>
<div><i><font color="#000099"> return $schema;<br>}</font></i></div>
<div> </div>
<div> </div></div>
<div>When I install the custom module, it installs without any warning/error.</div>
<div>But on form submit, when I try to save some data, it gives warning (table does not exist). </div>
<div> </div>
<div>Can somebody help me to understand, what could be the issue.</div>
<div> </div>
<div>Thanks</div>
<div>Austin</div>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Vaibhav Jain<br>