I have a module that will be used as a location finder, and it needs to create a table on install that will hold zip codes and their location. That's easy to do. However, I also need to populate that table. Seeing as it's quite a large dataset, and I already have it in a .sql
file, I would like to be able to run that file instead of embed the query into the module_install function.
I looked over the documentation for db_query()
, but I don't see a way to run a file.
Is this doable, or do I need to pull the database username and password out and run it manually?