• Hi,

    I’m am not a developer or knowledgable about php, so please hang with me.

    I have a music literacy website that helps people learn to read music. There are hundreds of examples. Currently they are stored on several pages and updating is very tedious.

    I have a friend who is fluent in php – but knows nothing about wordpress – who is going to build me a database for the music examples. The idea is people will go to one page and pull examples to them, instead of moving around the site to get to the examples.

    I’ve designed a shell here:

    https://developer.thepracticeroom.net/practice/

    You’ll see none of the buttons work yet, this is just how I want it to look. I’m comfortable in html but I have no idea how to connect the database my friend creates to that static page in wordpress. We plan to add that database to where my other wordpress databases are stored. My understanding is that it will be an MySQL database.

    So my question is: how do I get the content from the database to that page? I’m guessing that page will be dynamically generated – I just don’t know how to do it. My friend says he will create a .php page which can contain html and php. He’ll write the php and I’ve already mocked up the html.

    But since that will be a .php file – it won’t be a static wordpress page – which is how I need to display the information.

    I really hope I explained this okay. I’ve searched all through the codex, but most of this is over my head. Can any one direct me to some step by step directions?

    I appreciate any help or direction.

Viewing 1 replies (of 1 total)
  • Step by step instructions could be hundreds of lines long.

    If at all possible, I would stay with ‘standard’ WordPress tools.

    For example, the Pods CMS Framework plugin will let you create custom tables in the WP database, and provides the interface functions to update the tables and retrieve the data. It is highly likely that using Pods will be easier than trying to integrate a non-WP database.

    Just for thought, how will you maintain the records in the ‘outside’ database? Will you have a visual administration panel?

    And if I were given the task of creating the screen that you showed, I would first try using Custom Post types with Custom Fields for the ‘Type’, ‘Level’, ‘Time Signature’, and ‘Key Signature’. Custom Posts and Custom Fields are both widely used features of WP.

    However, if that doesn’t convice you, here is a post with sample PHP code to access MySQL database tables:

    https://wordpress.mcdspot.com/2010/03/15/code-to-dropcreateaccess-mysql-table/

Viewing 1 replies (of 1 total)
  • The topic ‘link to a database’ is closed to new replies.