Bug #162
Adding a new client fails on SQL insert.
| Status: | Closed | Start: | 08/08/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 100% |
||
| Category: | Clients | |||
| Target version: | 0.7.3 | |||
| Resolution: | fixed |
Description
Reproduce: Add a new client, inputting the phone number below.
+27 11 3236060
Expected outcome:
A new client is added OK, or
Phone number is rejected during validation.
A valid (South African) phone number is:
International dialling code: 27
Local dialling code: 011
Number: 3236060
Actual Outcome: SQL error.
Error message:
There was an SQL error: Data too long for column 'phone_number' at row 1 - INSERT INTO `AI_clients` (`id`, `company_name`, `short_name`, `contact_first_name`, `contact_last_name`, `mailing_address`, `mailing_city`, `mailing_state`, `mailing_country`, `mailing_zip_code`, `email_address`, `phone_number`, `tax_rate`, `currency_id`) VALUES (NULL, 'Daft Poets', 'daft-poets', 'William', 'Carlos', '1234 Deadbeat Street', 'Old York', 'Gauteng', 'South Africa', '1960', 'oscar.bajner@not-ur-mama.com', '+27 11 3236060', '14', '1')
./htdocs/argentumsvn/system/libraries/drivers/Database/Mysql.php [392]:
Setup: Windows Vista, Apache 2.2.6, PHP 5.2.6, MySQL 5.1.0, argentum svn trunk
Proposed solution: Change DB schema.
Increase table "clients" field "phone_number" to size 15 chars.
That should accommodate most international style phone numbers.
Associated revisions
Fixing #162.
History
Updated by Jeremy Bush over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset r261.
Updated by Jeremy Bush over 2 years ago
- Resolution set to fixed