mysql result display

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jorntk@yahoo.com

    mysql result display

    Hi,

    How can i display the result of query result as a string separated by comma?

    thanks and regards,

    Jorn
  • Jan Pieter Kunst

    #2
    Re: mysql result display

    In article <e9da850b.04040 71954.54b39fd6@ posting.google. com>,
    jorntk@yahoo.co m (jorntk@yahoo.c om) wrote:
    [color=blue]
    > How can i display the result of query result as a string separated by comma?[/color]

    Like this, for example:

    $mysql_result = mysql_query($qu ery);
    $array = mysql_fetch_arr ay($mysql_resul t);
    echo join(', ', $array);

    JP

    --
    Sorry, <devnull@cauce. org> is een "spam trap".
    E-mail adres is <jpk"at"akamail .com>, waarbij "at" = @.

    Comment

    • jorntk@yahoo.com

      #3
      Re: mysql result display

      I have a textarea that accept user input for products and its price.
      product and price are seperated by a space and products are seperated
      by newline. How can i extract these information to insert into the
      database?

      thanks and regards

      Jorn

      Comment

      Working...