Ciao a tutti, volevo sapere se potevate aiutarmi...ho installato da poco il PHPNEWS, tutto ok nella fase d'installazione!
il problema arriva quando cerco di visualizzare la News inserita, l'errore che mi da è:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in D:\Inetpub\webs\laparoladellavitait\public\phpnews \news.php on line 152
POSTO IL CODICE :
/* Get information about the News Post */
$SQL_query = mysql_query('SELECT n.id,n.posterid,n.postername,n.time,n.subject,n.ti tletext,n.maintext,n.catid,n.views,p.username,p.em ail,p.avatar,c.catname,c.caticon'
. ' FROM ' . $db_prefix . 'news AS n'
. ' LEFT JOIN ' . $db_prefix . 'posters AS p ON(n.posterid=p.id)'
. ' LEFT JOIN ' . $db_prefix . 'categories AS c ON(n.catid=c.id)'
. ' WHERE n.trusted = 1'
. ' ORDER by n.id DESC'
. ' LIMIT ' . $_GET['prevnext'] . ', ' . $Settings['numtoshow'] . '');
while($news = mysql_fetch_assoc($SQL_query)) QUI L'ERRPRE
{
/* Set Variables */
$time = strftime($Settings['timeformat'], $news['time']);
$subject = stripslashes($news['subject']);
$titletext = stripslashes($news['titletext']);
$maintext = stripslashes($news['maintext']);
$email = $news['email'];
/* Find out how many views of this article */
if($Settings['enablecountviews'] == '1')
{
$views = stripslashes($news['views']);
}
/* Print Comments if enabled */
if ($Settings['enablecomments'] == 1)
{
$query2 = mysql_query('SELECT count(*) as total FROM ' . $db_prefix . 'comments WHERE mid = ' . $news['id'] . '');
$var = mysql_fetch_assoc($query2);
$comments = '' . $language['CONTENT_NEWSCOMMENTS'] . ' (' . $var['total'] . ')';
}