phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
ODBC SQL Server Driver][SQL Server]Incorrect syntacs

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Simple SEO URL
::  
Author Message
jeremyotten



Joined: 29 May 2008
Posts: 35

ODBC SQL Server Driver][SQL Server]Incorrect syntacsPosted: Thu May 29, 2008 11:11 am    Post subject: ODBC SQL Server Driver][SQL Server]Incorrect syntacs

My setup
2003 standard
iis 6
php 5.2.6
isapi_rewrite lite
phpbb 3.01
SQL 2005 standard
no other mods

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'LIMIT'. [37000]

SQL

SELECT module_id FROM phpbb_modules WHERE module_langname = 'ACP_CAT_PHPBB_SEO' LIMIT 1

BACKTRACE


FILE: includes/db/mssql_odbc.php
LINE: 149
CALL: dbal->sql_error()

FILE: phpbb_seo/phpbb_seo_install.php
LINE: 656
CALL: dbal_mssql_odbc->sql_query()

FILE: phpbb_seo/phpbb_seo_install.php
LINE: 433
CALL: install_phpbb_seo->get_module_id()

FILE: phpbb_seo/phpbb_seo_install.php
LINE: 417
CALL: install_phpbb_seo->add_modules()

FILE: phpbb_seo/phpbb_seo_install.php
LINE: 162
CALL: install_phpbb_seo->main()

FILE: phpbb_seo/phpbb_seo_install.php
LINE: 62
CALL: module->load()
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3477

ODBC SQL Server Driver][SQL Server]Incorrect syntacsPosted: Thu May 29, 2008 8:46 pm    Post subject: Re: ODBC SQL Server Driver][SQL Server]Incorrect syntacs

in phpbb_seo_install.php, find :
Code:
         LIMIT 1";
      $result = $db->sql_query($sql);


Replace with :

Code:
      $result = $db->sql_query_limit($sql, 1);


Should do the trick Wink

_________________
phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible !
Back to top
jeremyotten



Joined: 29 May 2008
Posts: 35

ODBC SQL Server Driver][SQL Server]Incorrect syntacsPosted: Thu May 29, 2008 9:48 pm    Post subject: Re: ODBC SQL Server Driver][SQL Server]Incorrect syntacs

Sad NOGO..


Last edited by jeremyotten on Fri May 30, 2008 6:44 am; edited 1 time in total
Back to top
jeremyotten



Joined: 29 May 2008
Posts: 35

ODBC SQL Server Driver][SQL Server]Incorrect syntacsPosted: Thu May 29, 2008 10:30 pm    Post subject: Re: ODBC SQL Server Driver][SQL Server]Incorrect syntacs

sorry it didn't workout

replaced

function get_module_id($title) {
global $db, $user, $phpEx;
$sql = 'SELECT module_id
FROM ' . MODULES_TABLE . "
WHERE module_langname = '" . $db->sql_escape($title) . "'
LIMIT 1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ($row['module_id'] > 1) {
return intval($row['module_id']);
}
return 0;
}

with this

function get_module_id($title) {
global $db, $user, $phpEx;
$sql = 'SELECT module_id
FROM ' . MODULES_TABLE . "
WHERE module_langname = '" . $db->sql_escape($title) . "'
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
if ($row['module_id'] > 1) {
return intval($row['module_id']);
}
return 0;
}

and got this error

PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Inetpub\wwwroot\phpBB3\phpbb_seo\phpbb_seo_install.php on line 657
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3477

ODBC SQL Server Driver][SQL Server]Incorrect syntacsPosted: Fri May 30, 2008 7:56 am    Post subject: Re: ODBC SQL Server Driver][SQL Server]Incorrect syntacs

Sorry, forgot part of the code, so in phpbb_seo_install.php, find :
Code:
         WHERE module_langname = '" . $db->sql_escape($title) . "'
         LIMIT 1";
      $result = $db->sql_query($sql);


Replace with :

Code:
      WHERE module_langname = '" . $db->sql_escape($title). "'";
      $result = $db->sql_query_limit($sql, 1);


Should do the trick this time Wink

_________________
phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible !
Back to top
jeremyotten



Joined: 29 May 2008
Posts: 35

ODBC SQL Server Driver][SQL Server]Incorrect syntacsPosted: Fri May 30, 2008 6:12 pm    Post subject: Re: ODBC SQL Server Driver][SQL Server]Incorrect syntacs

Ok that worked out that code. Installation was OK!.

Only now in ACP I see a tab called ACP_CAT_PHPBB_SEO

When I click the Tab all is OK But at the left I see tree strange values

ACP_PHPBB_SEO_CLASS
ACP_FORUM_URL
ACP_HTACCESS

still another little bug?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

ODBC SQL Server Driver][SQL Server]Incorrect syntacsPosted: Mon Jun 02, 2008 8:22 am    Post subject: Re: ODBC SQL Server Driver][SQL Server]Incorrect syntacs

Nope, this mean you did not implement the language files of the mod, if English or French is not your borad's default lang, you'll need to use the English language pack files and code changes in the default language one.

_________________
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
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Simple SEO URL
Page 1 of 1

Navigation Similar Topics

Jump to: