I figured out in wordpress, you don't have to sign into database with php, you can just get it by using $wpdb.
Another problem arises though, for some reason when writing a query, I either just get a count or I get a result with a bunch of extra stuff from the query like the column name and table name and what not. here is the code I put in that is only giving me a count. I also tried echo, but echo won't give me any results at all.
global $wpdb;
$myrows = $wpdb->query( "SELECT * FROM wp_users WHERE display_name='pdiddledor';" );
var_dump($myrows);