updates
열에 만 새 업데이트를 연결하려고하고 나머지 열의 값을 업데이트하려고하지만, 운동을하는 것처럼 보입니다.PHP/MySQL concat 단일 열 및 테이블의 다른 열 업데이트
내 SQL은 다음과 같습니다
$query="Update tickets SET product='$product',
p='$p',
i='$i',
summary='$summary',
workaround='$workaround',
concat(updates,'$additional_update'),
status='$status',
raised_by='$raised_by',
updated_by_user='$updated_by' WHERE id='$id'";
updates
열이 새 업데이트는 기존 텍스트에 추가 할 의미가되는 코멘트 열 같다.
나는 웹 서버에 받고 있어요 오류 :
Update tickets SET product='T-Box', p='00000817766', i='-', summary='Testing update field
\r\nAdding an update\r\ntesting if null works for update', workaround='n/a', concat(updates,' ','[email protected]:53:17:second update/n'), status='Open', raised_by='No', updated_by_user='test2' WHERE id='223'
MySQL을 직접 쿼리를 실행 :
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(updates,'[email protected]:53:17:second update/n'), status='Open', raised_by='No', updat' at line 1
도움이 많이 감사합니다!
'updated = CONCAT (updates, 'additional_update'),'줄을 수정해야했습니다! – greenpool