| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
andyCheckerz
Joined: 07 Jan 2008 Posts: 3
|
Posted: Tue Jan 08, 2008 7:32 pm Post subject: dynamic meta tags v. 0.2.0 errors? |
|
|
I am getting the following error when viewing any topic on my board after updating it with this mod:
SQL ERROR [ mssql_odbc ]
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'LIMIT'. [37000]
My php bb 3.0.0 board is running using on a Windows 2003 box with php 5.2.5 and the crucial part for this error I think - MS SQL 2005 express
Cheers
Andy
NB - If I don't add the following code (from the read me) to viewtopic.php it seems to work ok
| Code: |
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - META
if ($i == 0) {
$m_kewrd = censor_text($row['post_subject']) . ' ' . $topic_data['forum_name'] . ' ';
$m_kewrd = '';
$seo_meta->meta['meta_desc'] = $seo_meta->meta_filter_txt( $message );
if($seo_meta->mconfig['topic_sql']) {
$sql = "SELECT w.word_text
FROM " . SEARCH_WORDMATCH_TABLE . " m, " . SEARCH_WORDLIST_TABLE . " w
WHERE m.post_id = {$row['post_id']}
AND w.word_id = m.word_id
AND w.word_common = 0
ORDER BY w.word_count DESC LIMIT 20";
if( ($result = $db->sql_query($sql)) ) {
while ( $meta_row = $db->sql_fetchrow($result) ) {
$m_kewrd .= ' ' . $meta_row['word_text'];
}
}
$db->sql_freeresult($result);
$seo_meta->meta['keywords'] = $seo_meta->make_keywords( $m_kewrd . ($seo_meta->mconfig['kewd_adddesc'] ? $seo_meta->meta['meta_desc'] : ''));
} else {
$seo_meta->meta['keywords'] = $seo_meta->make_keywords( $m_kewrd . $seo_meta->meta['meta_desc'] );
}
}
// www.phpBB-SEO.com SEO TOOLKIT END - META
|
|
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14131
|
Posted: Wed Jan 09, 2008 1:34 pm Post subject: Re: dynamic meta tags v. 0.2.0 errors? |
|
|
Hum, looks like the query does not work with myssql.
Remember you can set some otpions in includes/functions.php, you can bypass the sql and still have nice meta tag for topics (only the keywords list will be a bit less good) if you replace :
| Code: | | 'topic_sql' => true, |
with :
| Code: | | 'topic_sql' => false, |
in this line :
| Code: | | var $mconfig = array('keywordlimit' => 15, 'wordlimit' => 25, 'wordminlen' => 2, 'bbcodestrip' => 'img|url|flash', 'ellipsis' => ' ...', 'topic_sql' => true, 'kewd_adddesc' => false); |
I do not have any myssql instalation, but we can as well try something with the SQL.
Try replacing :
| Code: | $sql = "SELECT w.word_text
FROM " . SEARCH_WORDMATCH_TABLE . " m, " . SEARCH_WORDLIST_TABLE . " w
WHERE m.post_id = {$row['post_id']}
AND w.word_id = m.word_id
AND w.word_common = 0
ORDER BY w.word_count DESC LIMIT 20";
if( ($result = $db->sql_query($sql)) ) { |
with :
| Code: | $sql = "SELECT w.word_text
FROM " . SEARCH_WORDMATCH_TABLE . " m, " . SEARCH_WORDLIST_TABLE . " w
WHERE m.post_id = {$row['post_id']}
AND w.word_id = m.word_id
AND w.word_common = 0
ORDER BY w.word_count DESC";
if( ($result = $db->sql_query_limit($sql, 20, 0)) ) { |
Maybe the sql_query_limit() function will do a better job with myssql.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |