We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10546
    • 3 Posts
    I’m connecting to an IBM db2 database on a different server using ODBC. I would like one snippet to have the php that opens the connection to the database, one snippet that closes the connection, and many snippets that get various pieces of data that I can reuse.

    The only way a snippet will work is if I have all three parts in the same snippet (open connection, work with db, close connection). Has anyone done something like this before?