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

  • Home
  • SEARCH
  • 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 6727893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:06:15+00:00 2026-05-26T10:06:15+00:00

I have created a nice registration frontend app for registering new users for an

  • 0

I have created a nice registration frontend app for registering new users for an Event.

I’m now looking to create a Excel export of all attendees from the admin generated backend.

At the moment I’ve wrote a bit of SQL that give me the exact table I need:

select 
CONCAT(p.first_name,' ',p.last_name) as "Registered User",
p.email_address as "Register Email",
p.country as "Register Country",
t.name as "Attendee Type" ,
CONCAT(a.first_name, ' ',a.last_name) as "Attendee",
CONCAT(disc.name, ' ',disc.sex) as "Discipline",
CONCAT(divi.category, ' ', divi.weight) as "Division",
a.sex as "Sex",
a.club_name as "Club Name",
a.accomodation as "Accommodation",
a.`sharing_with1` as "Sharing With A",
a.`sharing_with2` as "Sharing With B",
a.`flight_number` as "Flight Number",
a.`flight_datetime` as "Flight Date",
a.`flight_time` as "Flight Time",
if(a.visa > 0, 'Yes', 'No') as "Visa",
a.dob as "Date of Birth",
a.passport as "Passport",
a.`expiry_date` as "Passport Expiry"

from `profile` p, `type` t,

`attendee` AS a LEFT JOIN `division` AS divi ON (a.division_id = `divi`.id) 
LEFT JOIN discipline AS disc ON (divi.discipline_id = disc.id)

where a.profile_id = p.id
 AND a.type_id = t.id 

As you can see there are few standard and outer joins.

I also realize I can in a template create the ordiary HTML table with the data and change the file headers to define it as an Excel File… User downloads and opens the file in Excel and never knows the difference.

What I want to know is; based on what I have e.g. the sql and the output plan what is the best way to make best use of symfony to do this?

Note: Symfony 1.4 with Doctrine.

  • 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-05-26T10:06:16+00:00Added an answer on May 26, 2026 at 10:06 am

    I think CSV is also a nice option, csv file can be opened with Excel.

    Anyway, what you can do is create a new action on your module. I suggest you to add it to the actions params (It will be displayed with the “new record” button).

    In your action, you just have to execute your request:

    $this->dbh = Doctrine_Manager::getInstance()->getConnection('doctrine');
    $stmt = $this->dbh->prepare($query);
    $stmt->execute();
    $stmt->fetchAll();
    

    You can add the response headers you need like this:

    $this->getResponse()->setHttpHeader('Content-Type', 'application/poney/excel');
    

    If you want you can bypass the templating:

    return $this->renderText($html);
    

    Usefull if you try to serv CSV \o/

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

Sidebar

Related Questions

I have created a nice scientific calculator and now want to save inputs and
I have created a nice looking toolbar using qt Designer and populated it with
I have created a nice silverlight control doing exactly what I want it to
I've created a nice app widget that I could not find on the market,
Be nice, I'm a total newbie to F#. I have created my first console
I have created a splashscreen for my android app. I went down the route
I have a UserProfile model defined in settings.py . Now I want to create
Sometimes Microsoft's exception messages are infuriatingly unhelpful. I have created a nice little MVC
I've got a nice facet_wrap density plot that I have created with ggplot2 .
I have created an application (a web-based application) which now has a large number

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.