Got it, thank you so much for the help. 🙂
Okay, how can I get that function on a file I’m using? It’s not in the wordpress directory, the file I am using. Also, the file I am using has another mysql connection, but I can always close that one and open a new one for wordpress as the insertion happens at the end of the script.