Fork me on GitHub

Watch

GitHub Core

Show your support for Zikula! Sign up at Github account and watch the Core project!




GitHub Modules

Forum Activity

Forum feed

» Visit forum | » View latest posts

Now I'm having problems with $pntable..  Bottom

  • Ok this is just a little test code I've been suing:

    Code

    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    echo $pntable['draft'];


    Now if I'm not mistaken this should display _draft on the page (I have no table prefix) since I do have a table named draft. My problem is that nothing is being echoed at all so when I try to use it in an SQL statement of course there are problems. Now what I find weird is if I use say

    Code

    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    echo $pntable['faqanswer'];


    Where faqanswer can be replaced by any postnuke standard module it will echo correctly but then if I use my or any other third party table name such as EZComments or advanced_polls_desc then it won't work correctly. Any idea what could be casuing this? Could it be something elsewhere in the script.?
  • The pntable array is populated dynamically - unless that module is loaded into the enviroment via a pnModLoad or such call then this module (and it's tables) remain unavailable to that execution of the script.

    The core tables are always available via pntables.php which is always included.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Yeah I figured that out...this was driving me nuts for ages and then I realized "Wait a second...how exactly would it know where to find these tables". ANyway thanks for the help Mark
  • 0 users

This list is based on users active over the last 60 minutes.