I did this for my copy of tForum. It isn't that hard. I used functions based off an earlier version (less complex) of phpmyadmin. I'm uncertain as to how the database is named for wwwthreads, but for my board, everything is preceded with a "t_" so I modified it so that only the tables starting with that prefix gets backed up by running a LIKE command to grab a table listing instead of all of the tables.
I won't post for now the entire code since it's geared for my forum, but basically all of the functions needed to be modified are in the phpmyadmin script named tbl_dump.php.
I also made 2 links on my admin panel. One that displays all of the table structure and data to the browser frame and the other gets saved to a file named forum_backup_10_16_2001.sql. Where the numbers are the date of backup. Like I said, I modified it quite a bit.
Once you look at the functions and follow what they do, you can easily change them to suit your needs.