Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Mvc\Model: load data from table fails when it contains float or double fields #1128

Closed
swen100 opened this issue Aug 21, 2013 · 1 comment

Comments

@swen100
Copy link

swen100 commented Aug 21, 2013

I have this problem only with version 1.2.3

I use MySQL for storage and use \Phalcon\Mvc\Model to load data from.

I have a table with a double or float field. When i use 'find' or 'findFirst' to load data from table it leads to an error:
Phalcon\Db\Exception: Column type does not support scale parameter

all works fine with version 1.2.2!

@dreamsxin
Copy link
Contributor

float should be no problem, In 1.2.2 did not deal with scale.

if (phalcon_memnstr_str(column_type, SL("float"))) {
    phalcon_array_update_string_long(&definition, SL("type"), 7, PH_SEPARATE);
    phalcon_array_update_string(&definition, SL("isNumeric"), &ztrue, PH_COPY | PH_SEPARATE);
    phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
    break;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants