Page 1 of 1

updating php-residence from another booking system

Posted: Wed Jan 02, 2008 5:33 pm
by deus3x
hello,

in the case you have already a client database builded from another booking form. i want to insert those client data in php-residence. everything seems fine but i don't get the date format. my check-in and check-our date are in mysql format 0000-00-00. should i use php on the fly to translate the dates in numbers of days since the begining of each year?

thanks for your help

Posted: Fri Jan 04, 2008 11:41 am
by marco
Are you trying to insert them directly in the database? For dates in reservations table (prenota200X) there is an id that refers to the periods table (periodi200X).

Marco

what i'm trying to do

Posted: Fri Jan 04, 2008 12:52 pm
by deus3x
is to take another database with a different structure and update the php-residence one with the past datas: name, check-in date, check-out date, room number. i've figured out the most of it but not how how i can integrate the rate associated for each day. i saw in your structure that you repeat the rate according to the number of day your client will stay so if i create a script to transfert all the datas from my old database i have to find out how i can do that...

Posted: Fri Jan 04, 2008 1:29 pm
by marco
For the prenota200X table:
The rates for each period, separated by commas, are stored in "tariffesettimanali". Their sum is stored in "tariffa", separated from the rate name by symbols #@&. The entire rate (including extra costs, discounts, etc.) is stored in "tariffa_tot".

Marco

thank you very much !

Posted: Fri Jan 04, 2008 7:14 pm
by deus3x
you are a great help