Hi there,
Someone using symfony? help me, please..

I have form class that I embed to another one..
In the embedded form, I have multiple checkboxes. But when I try to save it and I check some value of checkboxes, the error said "SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens".
But if I just check one of the checboxes, its run well..
Someone can give me the solution?

Regards,

Recommended Answers

All 3 Replies

post ur code where checkbox value is taken frm form.

If you will use array of check boxes like <input type="checkbox" name="chek1[1]" value="AAA"> <input type="checkbox" name="chek1[2]" value="BBBB">
it may help. If you are using already, then if you will relook into the code , you will be able to find the issue by yourself.

Before I move further, I want to ask something.
If I use sfWidgetFormChoice with multiple and expanded set to true, is the type of the field in the database must set to Enum? Because in my case, I set it to int..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.