Title: Database Interaction Question
Last modified: August 19, 2016

---

# Database Interaction Question

 *  Resolved [spyke01](https://wordpress.org/support/users/spyke01/)
 * (@spyke01)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/database-interaction-question/)
 * Hi guys, I’m fairly new to WP plugin coding and want to find the best way to 
   accomplish this. I need to pull a list of comments containing a specifically 
   formatted link and then cycle through them to create a XML file. Is there a built
   in function that would allow this and if not what is the WP approved version 
   of this:
 *     ```
       $result = mysql_query( "SELECT * FROM $wpdb->comments WHERE comment_content LIKE '%<a href=%nofollow%' );
       if ($result && mysql_num_rows($result) > 0) {
         while ($row = mysql_fetch_array($result)) {
           // do it you will
         }
         mysql_free_result();
       }
       ```
   
 * I’ve been looking through the docs but haven’t found exactly what I needed. Any
   help you can offer would be great.

Viewing 1 replies (of 1 total)

 *  Thread Starter [spyke01](https://wordpress.org/support/users/spyke01/)
 * (@spyke01)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/database-interaction-question/#post-1859593)
 * Sorry I just now saw that this should be in the hacks forum. I have marked this
   topic as resolved.

Viewing 1 replies (of 1 total)

The topic ‘Database Interaction Question’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [spyke01](https://wordpress.org/support/users/spyke01/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/database-interaction-question/#post-1859593)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
