phpScheduleIt
May 18, 2013, 03:13:50 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: How to generate "resid" in table "reservation  (Read 1769 times)
dev246
Newbie
*

Karma: 0
Posts: 4


« on: November 20, 2007, 10:31:12 AM »

Hi
I try integrate database from phpScheduleIt with other CRM system and I need some advise, how can I create correct "resid" in reservations table becouse if I put there my own unique "resid"  it  dosn't work.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #1 on: November 21, 2007, 09:46:14 AM »

There is a function in lib/DBEngine.class.php called get_new_id()
Logged
dev246
Newbie
*

Karma: 0
Posts: 4


« Reply #2 on: November 22, 2007, 07:14:54 AM »

Ok thx its work Smiley , but I have another problem. When I generate correct "resid" and I put new reservation (as blackout time) in to "reservations" table i can't book new job on that time (it's correct) but on "booking" page i don't have mark that blackout time on specific color , they looks like normal time to use (but if i check that time using "check available " i have message that is reserved).
It's my simple request to database :
Code:
INSERT INTO `reservations` VALUES ('sc147457156a4086', 'sc146dbd873c1893' , 'sc146dbd763d71a4', '1196031600', '1196290800', '0' , '30', '1195728847', 'NULL, 'NULL', '1', '0', ' sssssss', '0', '0')

I doing some think wrong with that request ? or maybe I should  add something more in database to mark as "blackout"  that date in "booking" page  ?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #3 on: November 26, 2007, 09:57:50 AM »

I would make sure that the start_date and end_date values are correct.  They should be created with hour, minute, and second parts of the datetime as 0.

For example, mktime(0,0,0, 11, 25, 2007)
Logged
dev246
Newbie
*

Karma: 0
Posts: 4


« Reply #4 on: November 27, 2007, 07:37:57 AM »

Ok i find the problem even if you add correct record in reservations table you must add additional record in reservation_users table.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!