Fork me on GitHub

Newbie help  Bottom

  • Hey :) I'm trying to make my first module. But for some reason the module wont install. What's wrong with my coding? I'm in a reaaally early programmer state :D

    I'm trying to get the install script to install two tables, example_characters and example_genres.

    Pnint.php;


    pntables.php;


    I really hope someone can help.
  • Jeanie

    for some reason the module wont install.

    This isn't enough information. what errors are you receiving?
  • First impression is that your other functions tables' names doesn't match thoses of your pntables function, should be :

    Code

    function Example_pntables()
    {
    $pntable = array();
    $Example = pnConfigGetVar('prefix') . '_example_characters';
    $genres = pnConfigGetVar('prefix') . '_example_genres';
    $pntable['example_characters'] = $Example;
    $pntable['example_genres'] = $genres;

    $pntable['example_characters_column'] = array('tid' => $Example . '.characterid',
    'catid' => $Example . '.categoryid',
    'number' => $Example . '.charname');
    $pntable['example_genres_column'] = array('
    genresid'
    => $genres . '.characterid',
    'genres' => $genres . '.categoryid');
    return $pntable;
    }

    When you have such a problem, printing the SQL queries is a good debugging method.
    Maybe your code have other problems, but this one was this first one that I spotted.

    --
    Visit my live reef aquarium.

    My Amazon wish list.
  • Dear PostNuke developers,

    I've just setup my company web site based on PostNuke, my boss was delighted with all the potential of PostNuke. But a new chalange was just arrive: I need to create a module that makes a query to a new table with 4 fileds (client, status, contract, email) macthing the email with the user email. to populate this new table I already have a VB6 application. My question is: is there any step by step manual? I try to use the example module, but I'm just a systems technician. Help please.

    EG

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