Support » Fixing WordPress » Connecting to custom database in wordpress

  • Resolved nimbus3000


    Hello Everyone,

    Can someone tell me how to connect to a custom table using wordpress?

    What i mean mean is this: i have created a table for adding registered users of my website. i have manually added a few rows of data to this table. now I want to be able to perform operations on this table using my wordpress frontend. My php code on the text section of wordpress page is somehow supressed and i am not able to get the desired output.

    Can someone please help?

    Cheers !

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator kmessinger


    AFAIK you can have only one database. I don’t adding the table will work either. Try looking for a plugin that might work.

    Moderator kmessinger


    Correction. A search shows you can add a table to the wp database with no problems. There are plugins for that.

    Thanks a lot for the reply kmessinger.

    Can you help me with the name of the plugin?
    I have spent a couple of days on the same thing now with nothing much to show for.

    Moderator kmessinger


    You can use phpMyAdmin and you can do anything to the database you want.

    This plugin might work

    A google search for plug in for adding tables to wordpress database shows info that might be of help.

    A search here for add+table+to+database also comes up with some information. Any plugin for wp has to have that function so there might be help in info on making plugins.

    Sorry I can’t be more specific.

    You may want to take a look at the wpdb functions that come with WordPress.

    I have used these to manually add data to a gravity form table with good success in the past. It will look similar to this:

    	UPDATE $wpdb->posts
    	SET post_parent = 7
    	WHERE ID = 15
    		AND post_status = 'static'

    Thanks a lot guys.

    Really appreciate the help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Connecting to custom database in wordpress’ is closed to new replies.