multiple search on one page

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
dolomitedave
Forum Newbie
Posts: 1
Joined: Wed Jul 28, 2010 5:04 pm

multiple search on one page

Post by dolomitedave »

hi,

I have been asked by my boss to create an internal site for easy viewing of database data. i am in very early development stage but have a working page. the way i have started this is to have one page that calls it's self but passing different parameters via querystring, post from a form and menus (there will be be 10 - 15 main menu options each with different submenus with such things as view data from today, last week, last month etc the idea being to generate a dynamic SQL statement each time. this works with one table but not sure how it would work with more, i don't fancy having 50+ SQL statements each one getting called via a link. has anyone done this before or have any good ideas on how to do this better? like i said i am using $_GET and $_POST. i have a meeting in a few weeks about this as no one has decided how to store the data yet ie new table per department or store all data in one table with one field denoting the dept obviously this will impact on how i code the page.

Many thanks for any help i receive
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: multiple search on one page

Post by Christopher »

It sounds like you are going about it correctly. Posting to the same page allows you to easily show errors. Querying more than one table should not be a problem. It can either be multiple independent or dependent queries, or joining tables in a single query. You would have to tell more about your database schema to get help on that.
(#10850)
Post Reply