generate id for tinedatabase

General stuff of the Tine 2.0 effort

generate id for tinedatabase

Postby loicponchon » Tue Apr 17, 2012 6:32 pm

Hello, first of all sorry for my English, I am French and I use an online translator.

I come to you because I need ais save contacts in tine20 through a customer registration form.

I can not generate the id, it's apparently but SHA1 is what type of sentence or word used as a basis?

I thank you in advance

well you
loicponchon
 
Posts: 3
Joined: Tue Apr 17, 2012 6:23 pm

Re: generate id for tinedatabase

Postby ph_il » Wed Apr 18, 2012 10:42 am

have a look at Tinebase_Record_Abstract::generateUID(), this is how we generate our record ids:

Code: Select all
$uid = sha1(mt_rand(). microtime());
Philipp Schüle
Tine 2.0 Core Developer

Visit http://www.tine20.com (commercial support, consulting and development)
Visit http://www.officespot20.com (Tine 2.0 hosting)
User avatar
ph_il
Tine 2.0 Core Developer
 
Posts: 3450
Joined: Fri Mar 07, 2008 11:41 am

Re: generate id for tinedatabase

Postby loicponchon » Wed Apr 18, 2012 12:32 pm

thank you for your prompt response, the uid is in fact a random character string.

I will try to implement the insertion and I will keep you informed of the result.
thank you again
well you
loicponchon
 
Posts: 3
Joined: Tue Apr 17, 2012 6:23 pm

Re: generate id for tinedatabase

Postby loicponchon » Wed Apr 18, 2012 12:47 pm

that's great it works flawlessly, a big thank you for this valuable help.
loicponchon
 
Posts: 3
Joined: Tue Apr 17, 2012 6:23 pm

Re: generate id for tinedatabase

Postby ph_il » Thu Apr 19, 2012 11:23 am

loicponchon wrote:that's great it works flawlessly, a big thank you for this valuable help.


perfect :)
you are welcome.
Philipp Schüle
Tine 2.0 Core Developer

Visit http://www.tine20.com (commercial support, consulting and development)
Visit http://www.officespot20.com (Tine 2.0 hosting)
User avatar
ph_il
Tine 2.0 Core Developer
 
Posts: 3450
Joined: Fri Mar 07, 2008 11:41 am


Return to General [English]

Who is online

Users browsing this forum: No registered users and 4 guests

Startseite
NewsDemoDownloadForumWikiBlog
Support
Support at first hand!
If the forum does not help anymore ... Professional support is available directly from our Tine2.0 core Developers.

more »