Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Why this Script doesn't work with vanilla DB?
Here is the script:
//------------------------------
//Edit this parameters:
//MySQL server adress
$host="localhost";
//Username
$user="askomm_tellus";
//Password
$pass="***";
//Database
$db="askomm_tellus";
//Table
$table="LUM_Discussion";
//Show last x posts
$laforums="5";
$link=mysql_connect($host, $user, $pass);
$db=mysql_select_db($db);
$query="select * from $table order by topic_time desc limit 0,$laforums";
$result=mysql_query($query, $link);
while ($row=mysql_fetch_row($result)) {
echo "<li><a href='http://www.domain.com/comments.php?DiscussionID=$row[0]' target='_blank'>$row[9]</a></li><br>";
}
0
This discussion has been closed.
Comments
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/askomm/public_html/tellas/faq/faq.php on line 87 Line 87 is that : while ($row=mysql_fetch_row($result)) {
To help track down the problem you need to be checking for errors. On the line before "while (" type this:
echo mysql_error();
Also to check that the database is assigned you can use an if statement to replace "$db=mysql_select_db($db);"
if (!$db=mysql_select_db($db)) echo 'select db failed';
Same goes for $link=...