Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- newbie to PHP reports
April 8, 2005, 5:29 pm
rate this thread
Hi...I'm currently in university and our group is doing a PHP front end
for MySQL database. I've been give the job of creating reports from
the database, using (this gets pretty complex) an alphabetical index
which will drop down usernames beginning with the selected
letter...this is to go across the top of the page, as
a b c d...etcetera...the name selected should generate a report on the
status of the user in three areas...I'm wondering if anyone out there
can give me a hint as to where to start. The basic web page is a
template so I have to embed my part of the project within the
template...but that's been done in a couple of other areas, so i kinda
know what I should do there.
Any and all help will be appreciated,
Re: newbie to PHP reports
I noticed that Message-ID:
contained the following:
The first place to start is with the database structure. If it's a
relational database then you need to make sure it is normalised. Then
it is just a question of deciding what queries to run. The alphabetical
index is pretty simple, it's just something like "SELECT * FROM users
WHERE lastname LIKE $firstletter%" Then on your page you do something
like <a href="querypage.php?letter=A>A</a> Use the value of
$_GET['letter'] (suitably sanitised) to set $firstletter which then
forms the basis of your query.
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker /