try daw ni wahoho...

SELECT GROUP_CONCAT(lastName SEPARATOR ' ') FROM tablename;



On 5/18/07, Richard Badlisan < [EMAIL PROTECTED]> wrote:

bale kung simple query lang is inani lugar ang result:

+-----------+----------------+
| client_id | client_name    |
+-----------+----------------+
|         1 | bill gates     |
|         2 | linus torvalds |
+-----------+----------------+

tapos gusto dayon nimo i-in-ani ang result?:

+--------------+----------------+
| client_name1 | client_name2   |
+--------------+----------------+
| bill gates   |linus torvalds  |
+--------------+----------------+

para sa akoa bai.. murag gamit jud ka ug PHP ana then isulod nimo sa
loop..

ambot lang anang concat sa sql, aside sa fields which is possible (e.gfield1 + 
field2), i dunno kung sa rows. diha na siguro jud ka mugamit ug
PHP... pero i dunno.. basin naa jud.. tsada ni nga pangutana..

2007/5/18, Jason Yap <[EMAIL PROTECTED]>:
>
> uu inana pero ang gusto nako kay i concat nya ang mga result sa usa ka
> query.
>
> On 5/18/07, Arthur Gapusan <[EMAIL PROTECTED] > wrote:
> >
> > Yap..pwede man ka mag concat sa sql mismo..
> >
> > SELECT concat(field1, field2, field3) FROM tablename;
> >
> > pwede jpn nimo sagulan ug lain string..
> >
> > SELECT concat(familyName, " ", firstName) FROM tablename;
> >
> > ingon ana ba imo pasabot?
> >
> > On 5/18/07, Jason Yap < [EMAIL PROTECTED]> wrote:
> > >
> > > sa console ko sa mysql ga buhat. ang ako lang, gusto nako na tanan
> > > retreiving of data buhaton ra sa mysql. as much as possible, ang gusto 
lang
> > > nako buhaton sa php is i-present ra ang data. wala nay mga data
> > > manipulation(concatenation,etc...) mahitabo sa php. sa mysql ra sya tanan.
> > > pero kung dili jud ni possible, sa php jud ko padulong ani. hehe
> > >
> > > On 5/18/07, Richard Badlisan < [EMAIL PROTECTED]> wrote:
> > > >
> > > > dako jud na nga question mark para sa akoa pre..
> > > > naa lang pud koy pangutana.. kung wala ka sa shell, unsaon nimo
> > > > pag execute sa query mismo? diba dependent man pud ang sql sa language 
na
> > > > imo gamiton like php, asp? aha diay nimo na siya ipadagan? kay kung sa
> > > > browser lang.. la ko idea kung puede na w/out using php... LAMP gud 
kunuhay
> > > > na sila.. IMO lang nuon.
> > > >
> > > > maghulat pud ko sa mga tubag sa uban about ani kay murag
> > > > interesado ko ani nga pangutana pud..
> > > >
> > > > *ga-atang sa kilid*
> > > >
> > > > 2007/5/18, Jason Yap < [EMAIL PROTECTED]>:
> > > > >
> > > > > Hi guys. Naa ko pangutana about sql query
> > > > >
> > > > > ang gusto nako mahitabo kay unsaon pagbutang sa isa ka row ang
> > > > > multiple results sa usa ka query without using php.
> > > > >
> > > > > example:
> > > > >
> > > > > kung sa normal query, ang results would be: a,b,c,d,e where each
> > > > > result is a row.
> > > > >
> > > > > ang gusto nako mahitabo kay query gihapon, same result,
> > > > > a,b,c,d,e, but in one row nlang.
> > > > >
> > > > >
> > > > > Is this possible in mysql without using php?
> > > > >
> > > > > Any help will be appreciated. Thanks :)
> > > > >
> > > > > --
> > > > > "Just being alive is such a lovely and wonderful thing."
> > > > > _________________________________________________
> > > > > Kagay-Anon Linux Users' Group (KLUG) Mailing List
> > > > > [email protected] (http://cdo.linux.org.ph)
> > > > > Searchable Archives: http://archives.free.net.ph
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > » http://www.syntacticsinc.com/
> > > > » http://g0ma.blogspot.com/
> > > > » [EMAIL PROTECTED]
> > > > » 呵呵呵......不告訴你! ♥ + ♦ ⇒ ♫
> > > > _________________________________________________
> > > > Kagay-Anon Linux Users' Group (KLUG) Mailing List
> > > > [email protected] (http://cdo.linux.org.ph)
> > > > Searchable Archives: http://archives.free.net.ph
> > > >
> > >
> > >
> > >
> > > --
> > > "Just being alive is such a lovely and wonderful thing."
> > >
> > > _________________________________________________
> > > Kagay-Anon Linux Users' Group (KLUG) Mailing List
> > > [email protected] (http://cdo.linux.org.ph)
> > > Searchable Archives: http://archives.free.net.ph
> > >
> >
> >
> > _________________________________________________
> > Kagay-Anon Linux Users' Group (KLUG) Mailing List
> > [email protected] (http://cdo.linux.org.ph)
> > Searchable Archives: http://archives.free.net.ph
> >
>
>
>
> --
> "Just being alive is such a lovely and wonderful thing."
>
> _________________________________________________
> Kagay-Anon Linux Users' Group (KLUG) Mailing List
> [email protected] (http://cdo.linux.org.ph)
> Searchable Archives: http://archives.free.net.ph
>



--
» http://www.syntacticsinc.com/
» http://g0ma.blogspot.com/
» [EMAIL PROTECTED]
» 呵呵呵......不告訴你! ♥ + ♦ ⇒ ♫

_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://cdo.linux.org.ph)
Searchable Archives: http://archives.free.net.ph

_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://cdo.linux.org.ph)
Searchable Archives: http://archives.free.net.ph

Reply via email to