Я изменяю веб-приложение, созданное на Wampserver. Я хочу добавить некоторые параметры, например раскрывающийся список с именем 'Район' на странице CustomerData / Create .
После добавления кода на fields.yaml:
district:
label: 'District'
options:
Ab: Aberdeen
Ad: Admiralty
Ap: Ap Lei Chau
Ca: Causeway Bay
Ce: Central
H: Happy Valley
K: Kowloon
M: Mid Levels
N: North Point
Pe: Peak
Po: Pok Fu Lam
Q: Quarry Bay
Sa: Sai Ying Pun
Sh: Sheung Wan
Ta: Taikoo Shing
Ti: Tin Hau
Wa: Wan Chai
Wo: Wong Chuk Hang
NT: NT
span: left
required: 1
type: dropdown
tab: 'Contact Information'
В MySQL Workbench я добавил 'District'as ENUM (' Kowloon ',' Central ',' North Point ',' Quarry Bay ',' Taikoo Shing ',' Tin Hau ',' Wan Chai ',' Happy Долина »,« Sai Ying Pun »,« Mid Levels »,« Sheung wan »,« Pok Fu Lam »,« Admiralty »,« Town of Kennedy »,« Ap Lei Chau »,« Peak »,« Wong Chuk Hang », 'NT', 'Causeway Bay').
Тем не менее, у меня есть следующая ошибка:
SQLSTATE [010000]: Предупреждение: 125 данных усечено для столбца «Район» в
строка 1 (SQL: вставить в ..... в строке 664
C: \ wamp64 ... \ Database \ connection.php)
Вот код Connection.php в строке 664:
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
Как исправить эту ошибку?