Dear Imran,
  With the Query and the results u have provided, i would conclude as follows

In Simple terms, if u want all results in a single line, then u will have to insert them in a Comma Separated format. and if u insert as different rows then u can go it with grabbing information and storing it in a variable and then displaying the value of the variable.
for ex.
$val="";
for($i=0;$i<mysql_num_rows($result);$i++)
{    $val.=$mysql_fetch_row['PartNumber'];  // this will fetch the mysql result
    $val.=","; // this will add a comma to the string
}

Your answer is ready, hope this works for u
  ----- Original Message -----
  From: imran shafiq
  To: [EMAIL PROTECTED]
  Sent: Monday, May 15, 2006 5:24 PM
  Subject: [php_mysql] Question for PHP / MySQL Expert


  Dear Experts
    How to display a result of a query in a single row?
    e.g.
    Select PartName From  Parts  Where Machine_id = 4;
    Above query display following results:
    PartName
    Clutch Gear
    SMRA
    SMD
    SMC
    Detector Assembly
   
    Required format is:
    Clutch Gear, SMRA, SMD, SMC, Detector Assembly
   
    Waiting for reply
    Imran Shafiq
   
  Send instant messages to your online friends http://uk.messenger.yahoo.com
  Send instant messages to your online friends http://uk.messenger.yahoo.com

  [Non-text portions of this message have been removed]



  The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning.



  SPONSORED LINKS American general life and accident insurance company  American general life insurance company  American general life 
        American general mortgage  American general life insurance  Computer internet security 


------------------------------------------------------------------------------
  YAHOO! GROUPS LINKS

    a..  Visit your group "php_mysql" on the web.
     
    b..  To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]
     
    c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------------------------------------------------------------



[Non-text portions of this message have been removed]



The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning.



SPONSORED LINKS
American general life and accident insurance company American general life insurance company American general life
American general mortgage American general life insurance Computer internet security


YAHOO! GROUPS LINKS




Reply via email to