Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I Have a Wordpress Site with few users who are my college students

They Registered using their RollNumbers/HallTicket Numbers as their usernames in Wordpress site

Now I Have Another Database with Their Personal Details like Marks, Rank etc

Now I want to Integrate this Database to Wordpress so that when student/user logins , then he/her could see their respective marks and other details

I Just want your suggestions/ideas to implement this, Not asking for a Complete solution

Thankyou

share|improve this question
    
What have you tried already? –  toscho Oct 16 '12 at 19:11
    
Please clarify what exactly you are asking. You have WP, custom table, users... Then what? –  Rarst Oct 16 '12 at 19:12
    
@Rarst Question Edited, Could u please suggest me –  Aryan Oct 16 '12 at 19:18
    
use wp_get_current_user()->ID to get the id of the current logged in user & then create an instance of wpdb class & use it to query the data –  Mridul Aggarwal Oct 16 '12 at 19:28

1 Answer 1

up vote 1 down vote accepted

You can use wpdb class to query your custom data from MySQL. Depending on your implementation you would either use:

  • global $wpdb object, if your custom data is in same database as WP itself
  • new custom instance of wpdb class if you need to connect to different database for custom data
share|improve this answer
    
We can use wpdb custom queries, but where we need to write our custom queries , we need to create a php file for that or we need to write it in an existing file ?? –  Aryan Oct 16 '12 at 20:06
    
@Aryan that can be done in different places, typical are theme's functions.php or creating a plugin. –  Rarst Oct 16 '12 at 20:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.