Hello

You can get on several ways
follow the urls
1.http://arafats.info/how-to-get-the-last-inserted-id-on-cakephp/
2.
http://arafats.info/how-can-i-get-the-first-or-last-row-from-database-in-cakephp-find-query/

I think both will help you

Thanks
Arafat

On Wed, Aug 8, 2012 at 10:37 PM, Mark Wratten <[email protected]> wrote:

> In your beforeSave callback you could include a cal that does something
> like - SELECT MAX(invoice_number) FROM table, then in your code, generate
> the next number. Though if the code is going to be used by many people
> simultaneously, you would need to create a unique index on that column, to
> prevent duplicates.
>
>
> On Friday, August 3, 2012 2:02:15 AM UTC-4, Mr. Manager wrote:
>>
>> Dear All,
>>
>> Current I want to generate invoice number like INV00001 and so I would
>> like to get the last value of filed no (stand for invoice number) in order
>> to generator one increment when we create a new invoice.
>>
>> I am looking forward to hearing from you as soon as possible.
>>
>> Best Regard,
>> Mr. Manager,
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>



-- 
*Thanks & Regards.
-----------------------------------------------------------------------------------------------------------------------------
Yasir Arafat (Hasib)*
*Deputy Project Manager, *Software Solutions
Grameen Solutions
Contact Information:
**
**
Cell : +8801816 536 901, +880197 *333* 2 888
Web: http://arafats.info
<http://arafats.info>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to