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: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] 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