[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing 1.3



There's a better way than inserting into the tables directly.

select person__save(NULL, 3, 'Chris', 'R', 'Travers', 232);

The second argument is the salutation id.

lsmb13=# select * from salutation;
 id | salutation
----+------------
  1 | Dr.
  2 | Miss.
  3 | Mr.
  4 | Mrs.
  5 | Ms.
  6 | Sir.
(6 rows)

The last argument is the id from the country table.

That creates the person and entity records and returns the id field
from the entity table.

to add a user, you can then:

select admin__save_user(NULL, [entity_id], 'ctravers', '[secretpasswd]');

You can combine these as follows:
select admin__save_user(NULL, person__save(NULL, 3, 'Chris', 'R',
'Travers', 232), 'ctravers', '[secretpasswd]');

Hope this helps.

Best Wishes,
Chris Travers