Jump to content

Schedules [SOLVED]


TAV1702

Recommended Posts

Hi. I have a quick question. I have installed a fresh install of phpVMS and as we all know from my previous post, I have a databse issue trying to restore my old one. I have the site up and running with all of my airports, dloads, fleet and all. Now I wasnt to add my schedules, but now MaxLoad is no longer used. Can anyone tell me what part of this following snippet is the max load? I was thinking I might be able to manually remove the max load from each one or something like that and I could then import the corrected info so I would not have to redo a couple hundred schedules.

Here is the insert with 1 of the schedules. Can you point out which part is maxload please? And would it be ok to attempt to do this? Obviously since I am starting from scratch, the times flown would be off too. Im not sure if it would be just as wise to start from scratch on schedules too or attempt this.

INSRT INTO `phpvms_schedules` (`id`, `code`, `flightnum`, `depicao`, `arricao`, `route`, `route_details`, `aircraft`, `flightlevel`, `distance`, `deptime`, `arrtime`, `flighttime`, `daysofweek`, `maxload`, `price`, `flighttype`, `timesflown`, `notes`, `enabled`, `bidid`) VALUES (1,'TAV','0557','KMCI','PHNL','','',1,'',3909.67,'08:00 CST','03:12 CST',7.12,'0346',0,586,'P',3,'',1,0),

Link to comment
Share on other sites

  • Administrators

Do you have the create table in the backup?

What I'd do maybe is rename it all to phpvms_schedules2 (which a quick find/replace can do), then import that. So you'll have a phpvms_schedules and phpvms_schedules2.. then you can drop the maxload column for phpvms_schedules2, or just rename the table to phpvms_schedules

Link to comment
Share on other sites

Well, it was a great idea, but yet again I get bit in the ass by that dam foreign key error on the server. My host dont know, he is just a reseller. Then he needs to get ahold of his reseller who most likely needs to get ahold of their reseller and so on. :D Time to switch hosts maybe? ;)

#1452 - Cannot add or update a child row: a foreign key constraint fails (`thunxxxxx_xxxxxx/phpvms_schedules2`, CONSTRAINT `phpvms_schedules2_ibfk_1` FOREIGN KEY (`code`) REFERENCES `phpvms_airlines` (`code`) ON UPDATE CASCADE)

Obviously I put the x's here on purpose.

Link to comment
Share on other sites

Nabeel My friend, you are just the MAN! Thanks a million. That just saved me loads of work. I took your trick from dropping and renaming to and from schedules2 to get rid of maxload and then did the 2nd trick on import and it was flawless. ;)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...