WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Database Interaction Question (2 posts)

  1. spyke01
    Member
    Posted 3 years ago #

    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.

  2. spyke01
    Member
    Posted 3 years ago #

    Sorry I just now saw that this should be in the hacks forum. I have marked this topic as resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.