[Mediawiki-l] Problems with SQL2wiki extension in template
Jean-Marc van Leerdam
j.m.van.leerdam at gmail.com
Wed Jul 8 05:16:54 UTC 2009
Hi,
2009/7/7 Jan Steinman <Jan at bytesmiths.com>:
> I'm having trouble using the SQL2wiki extension in a template.
>
> Something seems to be goofy about the use of a parameter. The
> parameter is not getting the value it is supposed to get, and the
> MySQL error messages seem to indicate that one of the curly braces is
> getting stripped off:
>
> Here is the template with as simple a query as I could muster; user_id
> 2 is a valid record:
>
>> <noinclude>{{project timelog1|2}}</noinclude>
>> <includeonly><sql2wiki database="EcoReality">SELECT * FROM
>> mw_user WHERE user_id = {{{1}}}</sql2wiki></includeonly>
>
> and here is what is produced, error messages in front of an empty table:
>
>> Warning: mysql_query() [<a href='http://www.mysql.com/doc'>http://www.mysql.com/doc
>> </a>]: You have an error in your SQL syntax; check the manual that
>> corresponds to your MySQL server version for the right syntax to use
>> near '{{1}}}' at line 1 in [full path deleted]/mediawiki-1.13.3/
>> extensions/SQL2Wiki.php on line 42
>>
I have no experience with this extension, but aren't user_id's
strings? In that case, the {{{1}}} probably needs some quotes around
it.
--
Regards,
Jean-Marc
--
. ___
. @@ // \\ "De Chelonian Mobile"
. (_,\/ \_/ \ TortoiseSVN
. \ \_/_\_/> The coolest Interface to (Sub)Version Control
. /_/ \_\ http://tortoisesvn.net
More information about the MediaWiki-l
mailing list