Jump to content

Display multiple data from mysql table in one line?


freaker87

Recommended Posts

i have a mysql table which contains name like

 

mid          mname

 

101          AAA

102          BBB

103          CCC

 

now i have to print this name in a html table like AAA, BBB, CCC

 

i am getting this by while loop in a variable but when loop changes then value also change so please tell me how i get this only in one variable & print

        $qry = "select * from memaster";

       

        $result = mysql_query($qry,$link);

       

        while ($row = mysql_fetch_array($result))

       

        {

            $mid = $row['mid'];

           

            $mname = $row['mname'];

 

        }

 

echo "<td> $mname</td>";

 

this is i am using......

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.