RE: [PHP-DB] Concat 3 fields in a query

From: Date: Fri, 03 Dec 2004 15:54:22 +0000
Subject: RE: [PHP-DB] Concat 3 fields in a query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-37558@lists.php.net to get a copy of this message
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@nywd.uscourts.gov To: php-db@lists.php.net 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


« previous php.db (#37558) next »