I followed the "Hellor World" template sample and work fine, but if I need to make a connection with other database different from that my tikiwiki uses, I loose the connection with mysql.
I'm using adodb.
Sample:
1) My tiki is installed on mySql
2) I wrote a tiki-pru.tpl
3) I wrote a tiki-pru.php with this php code:
// Initialization
require_once ('tiki-setup.php');
// Display the template
$smarty->assign('mid', 'tiki-pru.tpl');
//Connect to other database
$dbdb=ADONewConnection('postgres');
...other lines...
$smarty->display("tiki.tpl");
If I delete the line before "...other lines...", work fine, but if I include them, the "mysql" connection is lost and I obtain this error message:
Context:
File tiki-pru.php
Url tiki-pru.php
Query:
select "groupName" from "users_usergroups" where "userId"=?
Values:
0 2
Message:
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 '"users_usergroups" where "userId"=2' at line 1
Built query was probably:
select "groupName" from "users_usergroups" where "userId"='2'
i'd really like to have also described how the changed database table can be backported into the db/* scripts. or is this to advanced for this topic? i'm just curious, because i'd need this too. ;)
maybe a link to http://www.nabble.com/mess-with-sql-scripts-in-db--t33936.html or some other mailinglist archive.