I have a table (T1) with some fields F1,F2 (Columns) with some values in it.
What i tried
$sql=ALTER TABLE T1 AUTO_INCREMENT = 5977284313124, ADD F1 BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT
$sql2 ='UPDATE T1 SET F2 = CONCAT_WS('/','10.5072',F1)';
or concat('10.5072',F1)
The output what i want is should be in the format of 10.5072/F1 (F1 are the values auto incremented from 5977284313124)
Note:'/'
'/' is not an division symbol its just a dummy variable the output should something like this 10.5072/5977284313124 but should not be divided.
Can u help me in writ开发者_StackOverflow中文版ing the code for the above
The problem is not the SQL, it's the use of single quotes around the query and within the query. Look at how SO is highlighting it.
The line assigning to $sql2 should be:
$sql2 = "UPDATE T1 SET F2 = CONCAT_WS('/','10.5072',F1)";
精彩评论