Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8879479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:57:33+00:00 2026-06-14T19:57:33+00:00

I am currently developing a module for ExpressionEngine and have a quick questions regarding

  • 0

I am currently developing a module for ExpressionEngine and have a quick questions regarding outputting database queries into the table class.

The only way I have managed to do this is via the following:

$this->EE=& get_instance();
$this->EE->load->library('table');

    $data = $this->EE->db->query("SELECT * FROM my_table");

    echo $this->EE->table->generate($data);

This is great, but I would like to input some additional options in the table such as “Duplicate” and “Delete”. To do this I need to be able to out put the query results individually. I have attempted the following:

$this->EE=& get_instance();
$this->EE->load->library('table');

$query = $this->EE->db->query("SELECT * FROM my_table");

if ($query->num_rows() > 0)
  {
    foreach($query->result_array() as $row)
        {
            $this->EE->table->add_row(
                echo $row['id']."<br />\n";
            );
        }
  }


echo $this->EE->table->generate();

With the above I receive the following error “Parse error: syntax error, unexpected ‘echo’ (T_ECHO), expecting ‘”.

Any assistance would be appreciated.

Many thanks
Ben

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:57:34+00:00Added an answer on June 14, 2026 at 7:57 pm
        $this->EE->table->add_row($row['id']);
    

    Try that instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a module for Drupal 6, in which I have created a
Currently I am developing website in asp.net. I wanted to include spellchecker module into
Currently developing a PHP framework and have ran into my first problem. I need
I am currently developing a module for Apache 2/2.2 and need to perform some
I'm currently developing a custom module and for some reason it appends a blank
I'm currently developing a payment module, which is already working fine, even managed to
In a module I'm currently developing I tried to model the requirements to a
I'm currently developing a Django site in which users can have multiple 'accounts', so
I am developing a system with Symfony which has a notification module integrated into
I am currently developing an Apache module and after parsing POST data from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.