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 570419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:23:58+00:00 2026-05-13T13:23:58+00:00

In my application, i have: a table storing customers’ orders, and a table storing

  • 0

In my application, i have:

  • a table storing customers’ orders, and
  • a table storing order entries

so basically a one-to-many relationship between the orders table and the orders entries table (should be quite a common structure).

i have a page that display all of a customer’s orders (but not the entries). This part is simple, in my OrdersController, i have a viewAllOrdersAction which queries the DB, and send the results to the view for rendering.

Now, the next thing i want to do is, when the user clicks on a specific order, i want to go to a page which shows all the entries for that order.

i suppose i will need to add a viewOrderAction to the OrdersController which again queries the DB and send results to another view.

The question i have is regarding sending the orderId from the viewAllOrders page to the viewOrderAction and retrieving it there.

What is the right way to do this?

  1. Should i do a very simple form with a hidden orderId field and a link which does a submit? it does seem overkill…
  2. Or should i just compose a link URL with “?orderId=12345”? i would suppose this would be the better way, but how do i construct a URL with a GET param using the Zend_View’s URL helper (i.e. the $this->url(…) in a view)?

Thanks!

  • 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-13T13:23:58+00:00Added an answer on May 13, 2026 at 1:23 pm

    Option 2 is the best bet and it would look something like:

    <?php echo $this->url(array('order_id' => $this->order->getId()), $viewOrderRouteName); ?>
    

    Now if you didnt have a named route with module, contorller, action speced then you could:

    <?php echo $this->url(array(
        'order_id' => $this->order->getId()
        'module' => 'customer',
        'controller' => 'order',
        'action' => 'viewOrder'
    ), 'default' ); ?>
    

    Assuming you have the default route enabled. Note this just ouputs the url not a full a tag so use in it as the href attrib or use sprintf to compose the tag… I think there is a generic html tag helper so you could use that as well.

    Now if you dont want to expose your order ids in the url you could come up with some sort of other params to select the order itself (although this would require a join query in your view order controller) like customer username && order date or what have you simialr to how you might see a blog permalink as a date && a title “slug”.

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

Sidebar

Ask A Question

Stats

  • Questions 320k
  • Answers 320k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Unless I'm missing something, why not do math? Fist of… May 14, 2026 at 12:23 am
  • Editorial Team
    Editorial Team added an answer [plistData objectAtIndex:1]; This is an NSNumber. So the address of… May 14, 2026 at 12:23 am
  • Editorial Team
    Editorial Team added an answer If the issue is conditional authorization of buttons then don't… May 14, 2026 at 12:23 am

Related Questions

I have a situation where I have an Oracle procedure that is being called
I want to ask a question about how you would approach a simple object-oriented
Currently, I'm developing an application that depends on (and thus connects to) various databases
In an application I'm building I had an enumeration of account statuses: public enum
In one of my projects, I have an application that manages several clients (or

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.