• Resolved rforster

    (@rforster)


    Man I feel dumb. I’m trying to access the WP database via some code on a page to pull posts from a select statement. What the heck is my password? (!) I use:
    <?
    $dbh=mysql_connect (“localhost”, “Mysite_wrpd1”, “PASSWORD”)
    or die (‘I cannot connect to the database because: ‘ . mysql_error());
    mysql_select_db (“Mysite_wrpd1”);
    echo “<p>Database selected…\n”;

    I have a DB called “lists” with a few tables in it and it lets me do select statements and all is well. Works great. I can’t for the life of me remember any other password than the one I use to get into the dashboard.

    Am i missing something here? Or is my database alrady selected and just select from the posts table?

    Thanks!

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

The topic ‘Database Password?’ is closed to new replies.