[thelist] [sql] append function?

Rob Whitener rwhitener at DesignOptions.com
Tue Jan 7 17:31:02 CST 2003


If you are trying to concatenate $newData to the end of field, use the "."
operator (like perl) to perform the concatenation.

-----Original Message-----
From: Paul Bennett [mailto:paul at teltest.com]
Sent: Tuesday, January 07, 2003 6:28 PM
To: thelist at lists.evolt.org
Subject: [thelist] [sql] append function?


Currently to append new data into a field I have to make 2 queries. One
(select) to get the existing data, php to append the new data to the end
of the old, and then another query (update) to put the new data in. I am
using text data and found that using:

$sql = "update $tableName set field = field + $newData where....";

doesn't work as I suspect it expects two numeric operators to perform
addition.
Is there anything like:
$sql = "update $tableName set field = APPEND($newData) where....";
I have googled,  searched a few favourite php haunts, and even the mysql
manual with no joy as yet...

--
Paul Bennett
Internet Developer
Teltest Electronic Design
--------------------------
Phone : 64 4 237 0767
Web : http://www.teltest.com
Wap : http://wap.teltest.com
Email : paul at teltest.com
--------------------------


--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list