i have an old web db application written in classic asp with access way back in 2002. now i need to revive the project, and i’ve been studying php and mysql. am pretty new to wordpress, but very eager to learn.
is it possible for me to use wordpress as my cms, then in a custom post (which i stumbled upon online as i was researching this) connect to a mysql database (manually migrated from my access file) using standard php code to output whatever i need?
is there a better approach to all this? sorry, my googling has actually left me with more questions than answers.
thanks in advance guys, appreciate the help.
Yes you can, WordPress only extends the existing functions of php with there own but never replaces them. You can either create a new page type or make a pluggin that shows the information you need.
a new page would just open en close the connection with the external database as you would normally en probably easiest to use if your used to programming in php.
making a plugging would also allow you to simply open and close the database but requires you more research into the working of WordPress self. The advantiges of using a puggin for this that you can define shorttags for WordPress to use in your blog or site. more info on this can be found in the WordPress documentations http://codex.wordpress.org/Developer_Documentation.
the question of if there is a better way to do this? how about just use the database that you use for your information for the WordPress tables. WordPress doesn’t stop you from reusing the same database for the site for other things like storing data you want to use on your site. It’s easier to do because there is already an open connection to that database on every page. you only need to use the default PHP functions to retrieve the data. This is what I recome you do no matter how you extract the data afterworts. If the custom database is already created than you can just tell WordPress to install it self in that database. seeing that it uses WP_ as prefix it should not cause trouble.