Re: Displaying data a certian way.
| From: | Rob W. | Date: | Mon, 05 Jun 2006 04:17:38 +0000 |
| Subject: | Re: Displaying data a certian way. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237392@lists.php.net to get a copy of this message | ||
That worked. Thanks.
----- Original Message ----- From: "Chris" <dmagick@gmail.com>
To: "Rob W." <rob@fiberuplink.com>
Cc: <php-general@lists.php.net>
Sent: Sunday, June 04, 2006 10:59 PM
Subject: Re: [PHP] Displaying data a certian way.
Rob W. wrote:Ok, here's my issue that I have. Inside my database I have something that look's like thisRemember the previous cabinet and you can use that for checking whether to display another heading: .... $previous_cabinet = ''; while($row = mysql_fetch_assoc($query_result)) { if ($row['cabinetid'] != $previous_cabinet) {id serverid cabinetid ect...-----------------------------------------------------------------1 server1 1 2 server2 1 3 server3 1I am trying to get it to display the servers 1 2 & 3 under a display bar of cabinet 1. Anybody have any solutions to this? I am a novis to php and mysql but i know the majority of the basics.echo "Cabinet id " . (int)$row['cabinetid']; $previous_cabinet = $row['cabinetid'];} echo "Server " . htmlentities($row['serverid']) . "<br/>"; } -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php