Title: data search
Last modified: August 19, 2016

---

# data search

 *  [spiritualight](https://wordpress.org/support/users/spiritualight/)
 * (@spiritualight)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/data-search/)
 * Hi
 * Does anyone know of a plugin that would allow my blog members to search a database
   of names that I input myself.
 * So for example: I would input details of each person in my directory like
    Name
   Age Etc
 * and then my members could search using the Name fields. The names in my database
   wouldnt necessarily be members of my blog, but their names would be searchable
   by members of my blog, if that makes sense! lol
 * Any help or suggestions would be greatly appreciated.
 * I should also add that I would like the search function to search only the data
   I have inputted rather than posts or pages. 🙂
 * Any Ideas?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [spiritualight](https://wordpress.org/support/users/spiritualight/)
 * (@spiritualight)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/data-search/#post-1267157)
 * I dont seem to get any replies on my posts here! 🙁
 *  [cogmios](https://wordpress.org/support/users/cogmios/)
 * (@cogmios)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/data-search/#post-1267158)
 * Just download any php addressbook mysql application, install it and then either
   use an iframe to load it into a wp page or use wp-exec as plugin to query the
   db directly e.g. for searches or other things.
 * So: download XAMP , create a mysql db, create the db at your host, export/import
   the data and then create a WP page queering it:
 *     ```
       ini_set('display_errors',0);
       error_reporting(E_ALL|E_STRICT);
       $dbname = 'YOURDBNAME';
   
       $mysql_link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die (mysql_error() . 'Error connecting to mysql');
       mysql_select_db($dbname, $mysql_link) or die (mysql_error() . 'problem connecting with database');
       $sql ="SELECT * from names";
       $result = mysql_query($sql, $mysql_link) or die('Failed Query of '. $sql . ' ' . mysql_error());
       ```
   
 * you can now use e.g.
 *     ```
       while($row = mysql_fetch_array($result, MYSQL_ASSOC))
       {
       echo "<tr>";
       echo "<TD>$i</TD>";
       echo "<TD>{$row['NAME']}</td>";
       echo "<TD>{$row['PRODUCT']}</td>";
       echo "</tr>";
       }
       ```
   
 * to walk through your db and display it.
 * don’t forget to change the db back if you query the wp db e.g. if you further
   down query it for categories:
 *     ```
       <?php
       mysql_select_db(DB_NAME, $mysql_link) or die (mysql_error() . 'problem connecting with database');
       wp_list_categories('sort_column=name&number=10&title_li=&depth=10');
       ?>
       ```
   
 * Pretty easy. So start by downloading XAMP and then read the XAMP documentation
   on how to use phpmyadmin to create the database, fill it and export it.
 * cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘data search’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [cogmios](https://wordpress.org/support/users/cogmios/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/data-search/#post-1267158)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
