Typically when performing a database insert in Drupal 6 you use drupal_write_record. However, there is an instance where this does not work as expected. If you are creating a module that has a database table (defined by hook_schema), and you need to populate that table with data from within your install process, you might run into a problem. Lets look at an example.
Lets say you have a simple install file that looks like this: