Jump to content
xisto Community
Sign in to follow this  
Ahsaniqbalkmc

Wordpress: Fetch Additional Information From The Database

Recommended Posts

Wordpress runs on apache and mysql. The databse connection capabilites of wordpress are not known to most of wordpress users. The reason is that every thing is sort of automated and a user almost never needs to know how wordpress connects to the database and how it fetches data.I have ran into a problem where I need to create additonal entries into the wordpress database (entries that are not created by wordpress automatically) and then fetch data from these entries from within wordpress. The plan is to include a short summary of some terms that would be displayed when these terms are clicked. When a user clicks on a word (included in the list of words in the database), a connection to database would be made and a query be executed whereby corresponding information would be fetched and displayed to the user. In theory this looks simple but there are few glitches that need to be resolved. The most important of these is the securtiy issue created by connecting to the databse through a method not approved by wordpress.For instance I can simply creat a connection by the following using "<?php mysql_connect(server, username, password)?>" and then use this connection to perfrom queries and fetch data. But this would not be the secure way as the password can then be viewed easily and then can be used for ill things. So I am looking for more secure ways of connecting to the database from within wordpress structure (I mean without having the need to go to custom made pages specifically created for this purpose).I did some search on this topic and found that there is a function called "wpdb()" that exists specifically for fetching data from the database from within wordpress. The problem is that I don't know how to use this methos and whether it is secure enough or not. That is why I have created this topic to get more information from experts out there.

Share this post


Link to post
Share on other sites

You can always extend wordpress libraries instead of writing new database connections. The task is both simple and complicated and depends on how much skill you have. If I can get some free time sitting in front of the computer and install a test copy, I will be happy to do it for you. I'll let you know in 2-3 days if I do have the spare time. The only concern that I have is that I can manipulate any software to extend them but I lack the creative side for online websites.

Share this post


Link to post
Share on other sites

It would be very nice of you to do it for me. It would make my job easier but in addition to using the wordpress funcitons to fetch additional database queries, I also need to understand how it works and how to handle it. I am trying to get deep into the wordpress platform to make it customizable to the extent so that I can achieve anything that I think is suitable and good fro my website. And in my opinion, to be able to do so would take a lot of learning and understanding. It would also take a lot of practice but I am ready for it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.