SA-MP Forums Archive
MySQL add to fields content - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL add to fields content (/showthread.php?tid=463748)



MySQL add to fields content - dusk - 13.09.2013

Hello, how do i add text into a MySQL field?

If I send a normal UPDATE query, text gets deleted, and only the new one is written. Is it possible to add to it?


Re: MySQL add to fields content - Vince - 13.09.2013

Probably with the CONCAT() function.
PHP код:
textfield concat(textfield'new text here'



Re: MySQL add to fields content - DanishHaq - 13.09.2013

Nevermind, he was quicker ^^.


Re: MySQL add to fields content - dusk - 13.09.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
Probably with the CONCAT() function.
PHP код:
textfield concat(textfield'new text here'
But in this case i would have to load the old text first wouldn't i?


Re: MySQL add to fields content - Vince - 13.09.2013

No. The old values aren't overwritten until the query is done.