please , i have 2 tables contact : id_contact name ..
evenement : id_event action id_contact_event
and id_contact_event is a foreign key refering to id_contact in contact table , when i added this : <?php $r = Doctrine_Query::create() ->select('COUNT(*) as nb ') ->from('Evenement e') ->Where('e.id_contact_event = ?', $contact->getIdContact() ) ->groupBy('e.id_contact_event'); $num = $r->fetchOne();
?>
<td><?php echo $num; ?></td> i've got that error : Fatal error: Method Evenement::__toString() must not throw an exception in please help me !
Your returning the entire entity for your to string method essentially
putting you into a loop. Do something like return $this->id_event;
On Aug 14, 2012 4:49 PM, "jihane" <jihane.bah...@gmail.com> wrote:
> hello , that's my method :
> public function __toString()
> {
> return $this->getEvenement();
> }
> Le lundi 13 août 2012 21:53:19 UTC, Christian Flothmann a écrit :
>> Hello,
>> > i've got that error :
>> > Fatal error: Method Evenement::__toString() must not throw an
>> exception in
>> > please help me !
>> what does your __toString()-method in your Evenement-class look like?
> --
> 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 "symfony1" group.
> To post to this group, send email to symfony1@googlegroups.com
> To unsubscribe from this group, send email to
> symfony1+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony1?hl=en
> Your returning the entire entity for your to string method essentially > putting you into a loop. Do something like return $this->id_event; > On Aug 14, 2012 4:49 PM, "jihane" <jihane...@gmail.com <javascript:>> > wrote:
>> hello , that's my method : >> public function __toString()
>> {
>> return $this->getEvenement();
>> }
>> Le lundi 13 août 2012 21:53:19 UTC, Christian Flothmann a écrit :
>>> Hello,
>>> > i've got that error : >>> > Fatal error: Method Evenement::__toString() must not throw an >>> exception in >>> > please help me !
>>> what does your __toString()-method in your Evenement-class look like?
>> -- >> 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 "symfony1" group.
>> To post to this group, send email to symf...@googlegroups.com<javascript:>
>> To unsubscribe from this group, send email to
>> symfony1+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/symfony1?hl=en
> i've put this->getIdEvent(); and i've got another error :
> Catchable fatal error: Method Evenement::__toString() must return a string
> value in
> Le mardi 14 août 2012 20:53:13 UTC, David Durost a écrit :
>> Your returning the entire entity for your to string method essentially
>> putting you into a loop. Do something like return $this->id_event;
>> On Aug 14, 2012 4:49 PM, "jihane" <jihane...@gmail.com> wrote:
>>> hello , that's my method :
>>> public function __toString()
>>> {
>>> return $this->getEvenement();
>>> }
>>> Le lundi 13 août 2012 21:53:19 UTC, Christian Flothmann a écrit :
>>>> Hello,
>>>> > i've got that error :
>>>> > Fatal error: Method Evenement::__toString() must not throw an
>>>> exception in
>>>> > please help me !
>>>> what does your __toString()-method in your Evenement-class look like?
>>> --
>>> 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 "symfony1" group.
>>> To post to this group, send email to symf...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> symfony1+u...@**googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/symfony1?hl=en<http://groups.google.com/group/symfony1?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 "symfony1" group.
> To post to this group, send email to symfony1@googlegroups.com
> To unsubscribe from this group, send email to
> symfony1+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony1?hl=en
yes i have this method , and i've put also this->id_event , and i've got that error : Catchable fatal error: Method Evenement::__toString() must return a string value in , i don't know what's the problem
Le mardi 14 août 2012 21:03:48 UTC, David Durost a écrit :
> Do you have a method setup called getIdEvent? Else it'd just be > $this->id_event
> On Aug 14, 2012 5:00 PM, "jihane" <jihane...@gmail.com <javascript:>> > wrote:
>> i've put this->getIdEvent(); and i've got another error : >> Catchable fatal error: Method Evenement::__toString() must return a >> string value in
>> Le mardi 14 août 2012 20:53:13 UTC, David Durost a écrit :
>>> Your returning the entire entity for your to string method essentially >>> putting you into a loop. Do something like return $this->id_event; >>> On Aug 14, 2012 4:49 PM, "jihane" <jihane...@gmail.com> wrote:
>>>> hello , that's my method : >>>> public function __toString()
>>>> {
>>>> return $this->getEvenement();
>>>> }
>>>> Le lundi 13 août 2012 21:53:19 UTC, Christian Flothmann a écrit :
>>>>> Hello,
>>>>> > i've got that error : >>>>> > Fatal error: Method Evenement::__toString() must not throw an >>>>> exception in >>>>> > please help me !
>>>>> what does your __toString()-method in your Evenement-class look like?
>>>> -- >>>> 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 "symfony1" group.
>>>> To post to this group, send email to symf...@googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> symfony1+u...@**googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/symfony1?hl=en<http://groups.google.com/group/symfony1?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 "symfony1" group.
>> To post to this group, send email to symf...@googlegroups.com<javascript:>
>> To unsubscribe from this group, send email to
>> symfony1+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/symfony1?hl=en