Query

  • Author
    Posts
  • #623995

    arkatona
    Member

    I need to build a Query based on my MySQLDB to pull in several data points. The issue I have now is how to add First_Name & get them to list. Thoughts? PLEASE HELP!!!!

    [php]
    global $wpdb;

    $res = $wpdb->get_results(“SELECT Last_Name FROM football WHERE Team_Number = ’22′”);
    foreach ($res as $rs) {
    echo $rs->Last_Name;
    }
    [/php]

    The blog I need help with is iatoday.wordpress.com.

    #624169

    timethief
    Member

    Here at WordPress.com we cannot access the files containing the php for our blogs; only Staff can as this is a multiuser blogging platform. I believe you have posted to the wrong support forum.

    Please read this > http://support.wordpress.com/com-vs-org/ Then if you are asking about a wordpress.ORG install post to the correct forum for your software here > http://wordpress.ORG/support/

    #624181

    arkatona
    Member

    Ok, how can I Pull MySQL data into my WordPress blog? I don’t have to use PHP

    Thank you for quick reply.

    #624183

    timethief
    Member

    If you want to import blog content from a WordPress.org install into a WordPress.com free hosted blog see here please. > http://en.support.wordpress.com/moving-a-blog/#moving-from-wordpress-org

    If you want to accomplish anything else with respect to the database then that cannot be done.

    #624187

    arkatona
    Member

    So I am not able to pulled stored data into my wordpress blog from MySQL?

    #624189

    timethief
    Member

    No.

    #624190

    timethief
    Member

    You are not able to do that.

    #624192

    arkatona
    Member

    Thank you:

    Good News I am closer as I tinker: This works

    <table>
    <tr><td>First Name</td><td>Last Name</td><tr>
    [php]
    global $wpdb;
    $res = $wpdb->get_results(“SELECT Last_Name FROM football WHERE Team_Number = ’10′”);
    foreach ($res as $rs) {
    echo “<tr><td>PUT FIRST NAME HERE</td><td>” . $rs->Last_Name . “</td></tr>”;
    }
    [/php]
    </table>

    #624196

    timethief
    Member

    Do you recognize that you are posting to the wrong support forum? Please post to http://wordpress.ORG/support like I advised you to above.

    #624203

    arkatona
    Member

    Sorry, I will move my question. Didn’t mean to upset you

    #624204

    timethief
    Member

    No problem. I’m not upset. I’m simply concerned that free hosted WordPress.com bloggers who are supposed to post here, will read this thread and become confused and post to it, as that’s what’s happened in the past.

The topic ‘Query’ is closed to new replies.