I am editing an index.php file in the themes folder and I just need to run a query but I cant seem to run a query...here is what i tried
i tried to include the config files
<?php require( dirname(__FILE__) . '/wp-load.php'); ?>
<?php print DB_NAME;exit; ?>
that printed nothing
then i tried to do the mysql_query command
mysql_connect($server, $username, $password)
$users = mysql_query("select * ....");
print_r($users); exit;
nothing in either one....i know there has got to be an easier way to do a query in wordpress...any ideas