In the following php query but it does not allow me to remove this [GS] that is in brackets within the table as a record (NOTE: Below I leave a small Photo SQL Capture of my doubt I appreciate answers I think the picture explains better.)
$result3 = mssql_query(' UPDATE Ps_GameData.dbo.Chars
SET CharName = replace (CharName,\'' **[GS]** '\' ,'' ) ');
The error I get is the following:
Parse error: syntax error, unexpected [ in line 60
I want you to remove " [GS] " and leave the name empty.
Example:
The SQL query:
UPDATE PS_GameData.dbo.Chars SET CharName = replace (CharName, '**[GS]**' ,'')
Get this result:
[GS]Juan
In this case, I want to leave "Juan" simply without the content inside the bracket.
The SQL query works fine but I need to adapt this functionality using php.
Example:
$result3 = mssql_query(' UPDATE Ps_GameData.dbo.Chars
SET CharName = \'**[**\'+\'**GS**\'+\'**]**\' + CharName ');
It works great, but I want to remove it now and I can not find the way it is used replace but I do not place the character settings so that the bracket is part of the SQL query php
I would like to delete the character [ before GS as would be the synthesis:
$result3 = mssql_query("UPDATE Ps_GameData.dbo.Chars
SET CharName = replace (CharName,'\'[ '\','')