Ok, this looks quite "databasey" so I guess you will have a query like:
SELECT Rowid, Person, Timediff FROM transitional_records ORDER BY Timediff
I don't know what DB you use. let's say it is MySQL (the others are similar).
Always provide such things when asking for advice. Else it's not easy to
:[EMAIL PROTECTED]
Sent: Wednesday, 5 November 2008 12:28 AM
To: Matthew Halpin; PHP Generals Mailing List
Subject: Re: [PHP] Grouping records
> I have transactional records with the following structure
Records of what kind? Is it SQL?
--
PHP General Mailing List (http://www.php.net/)
> I have transactional records with the following structure
Records of what kind? Is it SQL?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I have transactional records with the following structure
Rowid TimePerson TimediffGroupid
1 20:22:49Bob
2 20:22:49Bob 0
3 20:22:50Bob 1
4 2
On Thu, January 19, 2006 12:19 pm, Jeffrey Pearson wrote:
> OK. I know I did this a LONG time ago but I don't remember how I did
> it. Thus, my post.
>
> I have a list of last names from a MySQL database. I need to display
> them grouped by the first letter of their last names and insert a
> separa
Sound like a straightforward control-break (at least, that's what
they used to call it in the COBOL days :-)
assuming you're getting data into an assoc array called $records,
you could stick this into your loop:
{
$letter = $records['LastName']{0};
if ($prev != $letter) {
Jeffrey Pearson wrote:
OK. I know I did this a LONG time ago but I don't remember how I did
it. Thus, my post.
I have a list of last names from a MySQL database. I need to display
them grouped by the first letter of their last names and insert a
separator on display. Similar to a phone boo
OK. I know I did this a LONG time ago but I don't remember how I did
it. Thus, my post.
I have a list of last names from a MySQL database. I need to display
them grouped by the first letter of their last names and insert a
separator on display. Similar to a phone book. So it looks like;
8 matches
Mail list logo