// Command
VipData[playerid][vip_player_reference] = Player_GetID(playerid); // get ID of player reference
strcpy(VipData[playerid][vip_role], role, YSI_MAX_STRING);
VipData[playerid][vip_level] = level;
new ORM:ormid = ORM:Vip_CreateORM(playerid);
orm_insert_inline(ormid);
When I try to insert, I get this error
[ERROR] error #1364 while executing query "INSERT INTO `vips` (`vip_level`,`vip_role`) VALUES ('0','Bronze')": Field 'vip_player_reference' doesn't have a default value
Why vip_player_reference won't work? I don't want use AUTO_INCREMENT and I need save, insert, delete by vip_player_reference
I Want to do something like this using ORM
INSERT INTO vips (vip_player_reference, vip_level, vip_role) VALUES (%d, %d, '%e')
I'm having a problem trying to insert data into the database.
When I try to insert, I get this error
[ERROR] error #1364 while executing query "INSERT INTO `vips` (`vip_level`,`vip_role`) VALUES ('0','Bronze')": Field 'vip_player_reference' doesn't have a default value
Why
vip_player_reference
won't work? I don't want useAUTO_INCREMENT
and I need save, insert, delete byvip_player_reference
I Want to do something like this using ORM