I have to display search results using the wordpress search, but searching in a database table that's not from the wordpress tables. So, for example, if my table's name is "customers", how can I write the code for do that search? Thanks a lot

  • 1
    Hi, Kelly, welcome. Please, check the guide How to Ask. A Question is like a piece of code, the better it's written and researched, the better the returned value. – brasofilo May 3 '13 at 21:14

You'll likely need to your the $wpdb object. Learn about it on the WordPress Codex.

Check out the Custom Database Tables series on WPTuts+ as well. Lots of really good information about when to use custom database tables, and how to access them efficiently, securely and with WordPress best practices. The series should teach you everything you need to know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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