By Wyze1 on
Hi Guys
Does anybody know how to insert data into a table after the tables have been created with the drupal_install_schema().
Can this be done from mymodule.install file or will I have to created a admin section in my module to do this:
How do I incorporate this into my mymodule.install file:
insert into {folders} (folder_id, name, datecreated ) values (1, 'Data', '". date("Y-m-d g:i") ."')");
Thanks
Comments
.install files can implement
.install files can implement the hook_install() hook. You can first do drupal_install_schema() and then fill the database. Example
Thanks For The Help
Thanks allot for your assistance!
In Open Source I Trust! Everybody Else Must Pay Cash!
I'm trying exactly this thing
I'm trying exactly this thing but it doesn't work by enabling a module. mymodule_install() seems only be called by the devel-module by reinstalling my module. Then all querys were executed correctly!
Any suggestions?
edit: I was blind...didn't uninstall the module so the hook_install() wasn't fired.