custom table

Discussion in 'Templates customization' started by john_h, May 4, 2010.

  1. john_h

    john_h New Member

    Joined:
    Feb 18, 2010
    Messages:
    30
    Hi,

    I created a custom database table in amember.
    How can I display data inside the new table into the templates?

    Any help would be greatly appreciated.

    JH
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can use php code in template and query your table:
    Code:
    {php}
    global $db; 
    $q = $db->query("select * from yourtable");
    while($r = mysql_fetch_assoc($q)){
      print $r['data'];
    }
    {/php}
    

Share This Page