Support the ongoing development of Laravel.io →
posted 7 years ago

I'm getting this error and not sure what it means :

SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'first' at row 1 (SQL: insert into `red` (`first`, `second`, `updated_at`, `created_at`) values (1674, 9222.00000001, 2017-09-09 18:18:35, 2017-09-09 18:18:35))

When creating my Tables , i set :


$table->float('first',15,15);
$table->float('second',15,15);

Which i think means , 15 digits allowed before decimal and 15 after. Is that wrong ?

I'm using Laravel 5.5

Their Doc :

$table->float('amount', 8, 2); FLOAT equivalent for the database, 8 digits in total and 2 after the decimal point.
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Abhi abhi728 Joined 6 Sep 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.