| :: |
| Author |
Message |
jeremyotten
Joined: 29 May 2008 Posts: 35
|
Posted: 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

Joined: 15 Mar 2006 Posts: 3477
|
|
| Back to top |
|
 |
jeremyotten
Joined: 29 May 2008 Posts: 35
|
Posted: Thu May 29, 2008 9:48 pm Post subject: Re: ODBC SQL Server Driver][SQL Server]Incorrect syntacs |
|
|
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
|
Posted: 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

Joined: 15 Mar 2006 Posts: 3477
|
Posted: 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  |
_________________ 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
|
Posted: 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

Joined: 28 Apr 2006 Posts: 14279
|
|
| Back to top |
|
 |
|
|