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 -----
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
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 [EMAIL PROTECTED] 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to