RE: [PHP] concat question
| From: | joakim dot andersson at cybercom dot se | Date: | Fri, 05 Jul 2002 07:52:41 +0000 |
| Subject: | RE: [PHP] concat question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-105589@lists.php.net to get a copy of this message | ||
This will work if it is a space you want between the two fields.
concat(ProfFName, ' ', ProfLName)
/Joakim
> -----Original Message-----
> From: Miguel Cruz [mailto:mnc@stoic.net]
> Sent: Friday, July 05, 2002 9:28 AM
> To: Matthew K. Gold
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] concat question
>
>
> On Fri, 5 Jul 2002, Matthew K. Gold wrote:
> > I'm having trouble including a concat column in my php.
> Here's the line
> > I've tried to use:
> >
> > $query = "Select CourseNumber, CourseTitle, concat(ProfFName, /" /",
> > ProfLName), InstitName, DiscName, Format from course, disc,
> instit, prof
> > where course.DiscID = disc.DiscID and course.InstitID =
> instit.InstitID and
> > course.ProfID = prof.ProfID order by CourseTitle";
> >
> > I think it has something to do with the double quotes and the escape
> > characters I'm using...I'm able to show ProfFName and ProfLName
> > separately...
>
> You need to use backslashes ( \ ) and not regular slashes ( /
> ) to escape
> quotes.
>
> miguel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>