Author Topic: Field 'gvauser_id' doesn't have a default value  (Read 2168 times)

xolights

  • Newbie
  • *
  • Posts: 6
    • View Profile
Field 'gvauser_id' doesn't have a default value
« on: June 30, 2018, 06:52:01 PM »
Hi ,

I have install VAM on local.

But when i want add new fleet i have this error : There was an error running the query [Field 'gvauser_id' doesn't have a default value]

Thx for help :)

Raajheer1

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Field 'gvauser_id' doesn't have a default value
« Reply #1 on: July 14, 2018, 10:23:35 AM »
Same issue here, I was able to fix the parameter_ID field but I am unsure of what the GVAUSER_ID Does. If it doesn't do anything then can I just set them all to one? Or do I need to set it to auto-increment from 1? Looking at the database it says its an integer with a character max defined at 11.

Some info:
The Error- There was an error running the query [Field 'gvauser_id' doesn't have a default value]

The Code-
Code: [Select]
$sql = "insert into va_finances (finance_date,amount,description,report_type,parameter_id) values (now(),$aircraftvalue,'$description','New Aircraft','1')";
The Database- http://prntscr.com/k6c3uh


Thanks,
Raaj Patel

quepsi83

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Field 'gvauser_id' doesn't have a default value
« Reply #2 on: July 16, 2018, 10:28:49 PM »
maybe this could help? GVAUSER is (at time of installation of VAM) the Super User Admin type.  The ID is the table INDEX value.  The User Manual tells you pretty much NOT to delete this record from the table.  Also, the table GVAUSERS is the actual PILOTS table. VAM does not work with the PILOTS table at all. So, check the Manual then retrace your setup and see if somewhere along your journey you've done something unusual to the Admin record in GVAUSERS table.

I've had other issues with VAM... but not this type of error... I'm thinking the Admin gvauser record got stepped on somewhere along the ling. Check the Manual and follow the steps as written. Good luck guys...

Cheers,

Keith

larsje40

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Field 'gvauser_id' doesn't have a default value
« Reply #3 on: November 02, 2019, 02:47:26 PM »
Same here, is there ant help from anyone from support available to pick up this problem and help people with this?

Realy hope there is someone who can help us with this!

gr.

drgullen

  • Full Member
  • ***
  • Posts: 175
    • View Profile
Re: Field 'gvauser_id' doesn't have a default value
« Reply #4 on: November 02, 2019, 06:28:07 PM »
Check this thread for a possible solution:

http://virtualairlinesmanager.net/foro//index.php?topic=2215.0

larsje40

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Field 'gvauser_id' doesn't have a default value
« Reply #5 on: November 04, 2019, 11:08:52 AM »
no this also didn't work for me if i change the line in the fleetcontroller part with the user id 22 (i checked the database and it is the right id) it gives another fault underneath the fault.

Database Error
Error: SQLSTATE[HY000]: General error: 1364 Field 'value' doesn't have a default value
SQL Query: INSERT INTO `md192966db486420`.`fleets` (`status`, `booked`, `fleettype_id`, `registry`, `location`, `hours`, `name`, `hub_id`) VALUES ("", '0', 7, 'PH-ABC', '', "", 'Fenne', 6)
Notice: If you want to customize this error message, create app/View/Errors/pdo_error.ctp

so really no idea how to fix this.

Hope someone can help.

Headsniper1997

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Field 'gvauser_id' doesn't have a default value
« Reply #6 on: June 01, 2021, 12:05:28 AM »
Set 'value' to NULL and hangar to NULL, worked for me