So far, I have this, which is supposed to work:
CODE
<?PHP
include("./includes/main.php");
get_header("Home");
get_menu();
echo "<div class='news'> \n
<h3>News:</h3> \n
<table class='news'> \n";
$news_query = mysql_query("SELECT content FROM pmdbs_news WHERE 1 SORT BY date", $db_handle);
for ($news_counter = 0;$news_counter <= $config['max_news'];$news_counter++)
{
$news_title = mysql_result($news_query,"title",$news_counter);
$news_content = mysql_result($news_query,"content",$news_counter);
$news_date = mysql_result($news_query,"date",$news_counter);
echo "<tr class='news_title'> \n
<td>".$news_title."</td> \n
</tr> \n
<tr class='news_date'> \n
<td>".$news_date."</td> \n
</tr> \n
<tr class='news_content'> \n
<td>".$news_content."</td> \n
</tr>";
}
get_footer();
?>
And, I get:
CODE
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 10
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 13
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 14
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 15
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 13
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 14
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 15
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 13
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 14
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 15
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 13
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 14
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 15
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 13
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 14
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 15
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 13
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 14
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\pmdbs\index.php on line 15
ARGH! I point to my query ok, so what's up with that?
BTW, don't worry about the mysql connection being started, that is done in an include file via main.php.
I have tried declaring all my mysql stuff on the page you can find at the top, and still no results. The password is ok, the connection is fine (it seems), but friggin mysql result won't find the query! Whats up with that?