Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [bf] Multiple tables in one template

Quote Reply
Re: [bf] Multiple tables in one template In reply to
Sorry - I didn't explain that as well as I should have. I'm not suggesting that you use TheStone's "template dumper" code, I'm suggesting that you create a file called Custom.pm (or whatever.pm) and put it in /admin/Dbsql. Then you can write custom perl sub routines using the GT libs that access other tables in your database. I have used this technique extensively on a site that uses over 80 different tables in DBManSQL, and it works beautifully, often accessing 5-6 different tables on the same page. You do need to be comfortable with a little basic perl programming, of course. If you decide to go this route, I would also suggest that you spend some time reading through the GT Module documentation, which you can access by clicking the "Help" link in your admin panel.

In any event, the way you would use this in a template is as follows. Say you put a subroutine called "doTheThing" in a new module called "Custom.pm". You could call that subroutine from any template in your setup by using <%Dbsql::Custom::doTheThing%>. If you write a subroutine that can have args passed to it, then you would use <%Dbsql::Custom::doTheThing($arg1, $arg2, etc.)%>

I hope that helps. I admit, this approach may be a little advanced for a new user without much perl experience. But like I said, I've had great success with it, and I'm a crappy programmer with VERY little perl knowledge. Once you get the hang of it, it's a great way to extend the functionality of DBMan SQL.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Subject Author Views Date
Thread Multiple tables in one template bf 23697 Mar 19, 2003, 12:46 PM
Thread Re: [bf] Multiple tables in one template
hennagaijin 23493 Mar 19, 2003, 4:42 PM
Thread Re: [hennagaijin] Multiple tables in one template
bf 23430 Mar 20, 2003, 7:04 AM
Post Re: [bf] Multiple tables in one template
hennagaijin 23378 Mar 20, 2003, 7:19 AM
Thread Re: [bf] Anybody Home?????
bf 23330 Mar 21, 2003, 11:45 AM
Thread Re: [bf] Anybody Home?????
604 23389 Mar 21, 2003, 4:32 PM
Post Re: [TheStone] Anybody Home?????
bf 23356 Mar 23, 2003, 10:28 AM
Thread Re: [604] Anybody Home?????
Dempsey 22629 Sep 1, 2009, 9:29 PM
Thread Re: [Dempsey] Anybody Home?????
Dempsey 22596 Sep 5, 2009, 2:45 PM
Thread Re: [Dempsey] Anybody Home?????
Dempsey 22594 Sep 6, 2009, 9:45 PM
Thread Re: [Dempsey] Anybody Home?????
604 22543 Sep 11, 2009, 9:37 AM
Post Re: [604] Anybody Home?????
Dempsey 22514 Sep 12, 2009, 1:15 PM
Thread Re: [604] Anybody Home?????
Dempsey 22456 Sep 17, 2009, 9:51 PM
Thread Re: [Dempsey] Anybody Home?????
604 22429 Sep 18, 2009, 8:59 AM
Thread Re: [604] Anybody Home?????
Dempsey 22416 Sep 19, 2009, 10:31 AM
Post Re: [Dempsey] Anybody Home?????
Dempsey 22300 Sep 23, 2009, 9:51 PM
Thread Re: [604] Anybody Home?????
Dempsey 22608 Sep 9, 2009, 8:57 PM
Post Re: [Dempsey] Anybody Home?????
Dempsey 22552 Sep 11, 2009, 12:05 AM