RE: Concat 3 fields in a query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



or use concat_ws (concatenation with separator)

concat_ws('-',{$_POST['PO_Year']},{$_POST['PO_Month']},{$_POST['PO_Day']})

bastien

ps. I strongly recommend validating data before you insert into the db



From: Khristopher_Klaich@xxxxxxxxxxxxxxxxx
To: php-db@xxxxxxxxxxxxx
Subject:  Concat 3 fields in a query
Date: Fri, 3 Dec 2004 09:02:33 -0500

Hello I have a application that has an insert query (using a mysql
database) and I am having an issue with trying to combine three fields
with a dash .  Here is my code can anyone please help me out with what
else I need to add or point me to somewhere that explains how to combine
field's in a query......

'{$_POST['PO_Year']}-{$_POST['PO_Month']}-{$_POST['PO_Day']}'

Thanks-
Khris

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux