When submitted, your form send you string data... So you need to cast it before inserting them into your table. In your case : $qry->cod_ibge = (int)$formData['cod_ibge'];
On Wed, Apr 8, 2009 at 2:00 PM, helderfelipe <[email protected]> wrote: > > im trying to do this > > $qry = $cidadeModel->createRow(); > $qry->id_estado = $formData['id_estado']; > $qry->cidade = $formData['cidade']; > $qry->cod_ibge = $formData['cod_ibge']; > $qry->save(); > > the field cod_ibge have null allowed in the database, but this error > happens: "...Incorrect integer value..." > if i set $qry->cod_ibge = 0 it works > what can i do ? > -- > View this message in context: > http://www.nabble.com/integer-null-record-problem-tp22948674p22948674.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > -- Thomas VEQUAUD http://thomas.vequaud.free.fr/ Expert EPITECH en Ingénierie Informatique Tél : +33(0)6.50.39.28.10 Fax: +33(0)9.58.46.10.07
