I don't know if others does, but I don't get the question :)
On 25 kvě, 03:01, Germana Oliveira <germanaolivei...@gmail.com> wrote: > Hi!! > > i have a table on MySQL with a created_at field : > ... > created_at | datetime > ... > > In my symfony project i just begin working with Filters (FormFilter). > I have this: > > [CODE] > $this->setWidgets(array( > 'created_at' => new sfWidgetFormFilterDate(array( > 'from_date' => new sfWidgetFormI18nDate(array('culture' => > 'es','format' => '%day%-%month%-%year%')), > 'to_date' => new sfWidgetFormI18nDate(array('culture' => > 'es', 'format' => '%day%-%month%-%year%')), > 'with_empty' => false, > 'template' => 'desde: %from_date% hasta: %to_date%', > )), > 'correlativo' => new sfWidgetFormFilterInput(array( > 'with_empty' => true, > 'empty_label' => 'que este vacío', > )), > 'categoria_id' => new sfWidgetFormPropelChoice(array( > 'model' => 'Categoria', > 'add_empty' => true, > )), > 'ilicito_id' => new sfWidgetFormPropelChoice(array( > 'model' => 'Ilicito', > 'add_empty' => true, > )), > 'empleado_id' => new sfWidgetFormPropelChoice(array( > 'model' => 'Empleado', > 'add_empty' => true, > )), > )); > [CODE] > > The Form is just perfect and it does the filtering, as long as there's > no created_at. This is my action: > > [CODE] > public function executeSearch(sfWebRequest $request) > { > if( $request->getParameter('denuncia_filters')) > { > $this->form = new > DenunciaFormFilter( $request->getParameter('denuncia_filters') ); > $criteria = > $this->form->buildCriteria($request->getParameter('denuncia_filters')); > $this->resultados = DenunciaPeer::doCount($criteria); > $request->setParameter('resultados', $this->resultados); > }else{ > $this->form = new DenunciaFormFilter(); > } > > } > [CODE] > > For now i just want to count the results. > The problem is when i put the created_at field: > > Notice: Array to string conversion > in > /usr/local/symfony/RELEASE_1_2_5/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/DebugPDOStatement.php > on line 80 > > This the code of line 80: > > [CODE] > public function bindValue($pos, $value, $type = PDO::PARAM_STR) > { > $typestr = isset($this->typeMap[$type]) ? > $this->typeMap[$type] : '(default)'; > if ($type == PDO::PARAM_LOB) { > $this->pdo->log("Binding [LOB value] at position > ".$pos." w/ PDO type " . $typestr); > } else { > $this->pdo->log("Binding " . var_export($value, > true) . " at position $pos w/ PDO type " . $typestr); > } > return parent::bindValue($pos, $value, $type); > } > [CODE] > > the exact line: return parent::bindValue($pos, $value, $type); > > And, another weir theing (i think) is that no matter what i select in > the created_at field, even if it is blank is always in the SELECT: > > SELECT COUNT(*) FROM `denuncia` WHERE (denuncia.CREATED_AT>=:p1 AND > denuncia.CREATED_AT<=:p2) > > Any idea?? Thanks!!!! :D > > -- > Germana Oliveira > > http://626f67.wordpress.comhttp://slcarabobo.wordpress.com > > "Fool me once, shame on you. Fool me dozens of times, I'm an Apple customer." > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en