Forums

Exporting to CSV (3 posts)

  1. Dave Redfern
    Member
    Posted 2 years ago #

    Hello,

    I am building a plugin and I want to export a table I have created to a CSV. I know i can run the query:-

    global $wpdb
    $results = $wpdb->get_results('select * from ' . $wpdb->prefix . 'table');

    To get the results but how do i then export?

    Thanks

    Dave.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Could use the phpMyAdmin Export function to export to CSV.

    Might also look at how http://wordpress.org/extend/plugins/users-to-csv/ does that.

  3. jcasabona
    Member
    Posted 1 year ago #

    Anything more on this? I'm trying to do something similar but can't get the export to play nicely with WordPress.

Topic Closed

This topic has been closed to new replies.

About this Topic