yes, thanks to everyone who has answered me! I know $i++ and ++$i and so on…

I just don’t get the OO notation so well yet, so I didn’t make the link.

 

Thank you!

 

Von: Matthew Ratzloff [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 10. Dezember 2008 19:19
An: Markus Hausammann
Cc: [email protected]
Betreff: Re: [fw-general] noob-question: increment integer in db

 

http://us2.php.net/manual/en/language.operators.increment.php

 

Increment and decrement operators were introduced by C and are found in most 
popular languages, with the exception of Python and Ruby.

 

-Matt

On Tue, Dec 9, 2008 at 8:29 AM, Markus Hausammann <[EMAIL PROTECTED]> wrote:

it works, that's amazing, I don't get the principle behind this operation
but it works :)

-----Ursprüngliche Nachricht-----
Von: Jan Pieper [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 9. Dezember 2008 18:24
An: Markus Hausammann; [email protected]
Betreff: Re: [fw-general] noob-question: increment integer in db


I don´t know Zend_Db_Table very well but try this:

[...]
++$row->pointer;
$row->save();

-------- Original-Nachricht --------
> Datum: Tue, 9 Dec 2008 18:20:42 +0200
> Von: "Markus Hausammann" <[EMAIL PROTECTED]>
> An: [email protected]
> Betreff: [fw-general] noob-question: increment integer in db

> Hi
>
> I would like to increment an integer column in my db.
>
> What I've tried is this:
>
>
>
> $row = $this->findDependentRowset('ParamsUser')->current();
>
>             $row->pointer = 'pointer + 1';
>
>             $row->save();
>
>
>
> Obviously it doesn't work, how could I do it?
>
> Thanks!
>
> Markus
>
>
>
> PS I sent this question to fw-db but it didn't deliver.so forgive if it
> should deliver later and be duplicate.
>

--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a

 

Reply via email to