Fw: [PHP] rows not columns
| From: | Balaji Ankem | Date: | Thu, 26 Jul 2001 13:45:18 +0000 |
| Subject: | Fw: [PHP] rows not columns | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-59741@lists.php.net to get a copy of this message | ||
assume $result is the result stored after execution of query.
while ($row = mysql_fetch_object($result))
{
echo $row->column1;
echo (" ");
echo $row->column2;
echo (" ");
echo $row->column3;
echo (" ");
echo $row->column4;
echo ("<br>");
}
here column1,2,3,4 are the attributes of the table.
hope this will help u.
----- Original Message -----
From: AJDIN BRANDIC
To: php-general@lists.php.net
Sent: Thursday, July 26, 2001 7:14 PM
Subject: [PHP] rows not columns
I am trying to display result of a MySQL query using php.
Say I get 4 rows from my query. I want to display them verticaly
in a table like this
title1 field one1 field one2 field one3 field one4
title2 field two1 field two2 field two3 field two4
title3 field three1 field three2 field three3 field three4
title4 field four1 field four2 field four3 field four4
Any ideas how to contruct this inside a while loop without doing multyple
selects.
REgards
Ajdin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
The Information contained and transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at mailadmin@wipro.com.
The Information contained and transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at mailadmin@wipro.com.