I have a parent table. One column of the table is referenced as a foreign key to another table. The parent table has correct data in the referenced column. When I am trying to insert to the child table I am facing foreign key constraint error. The value for the referenced column is present in the parent table.
Parent table structure :
CREATE TABLE linked_in_profile_data_values (
LINKED_IN_PROFILE_DATA_VALUES_ID varchar(45) NOT NULL,
LINKED_IN_PROFILE_DATA_ID varchar(45) NOT NULL,
IS_CURRENT tinyint(4) DEFAULT NULL,
SUMMARY varchar(45) DEFAULT NULL,
TITLE varchar(45) DEFAULT NULL,
user_id int(10) NOT NULL,
LINKED_IN_PROFILE_DATA_VALUES_PK varchar(45) NOT NULL,
PRIMARY KEY (LINKED_IN_PROFILE_DATA_VALUES_ID,LINKED_IN_PROFILE_DATA_ID,user_id),
UNIQUE KEY LINKED_IN_PROFILE_DATA_VALUES_PK_UNIQUE (LINKED_IN_PROFILE_DATA_VALUES_PK),
KEY FX2_LINKED_IN_PROFILE_DATA_ID_idx (LINKED_IN_PROFILE_DATA_ID),
CONSTRAINT FX2_LINKED_IN_PROFILE_DATA_ID FOREIGN KEY (LINKED_IN_PROFILE_DATA_ID) REFERENCES linked_in_profile_data (LINKED_IN_PROFILE_DATA_ID) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Child Table Structure :
CREATE TABLE linked_in_profile_data_company (
LINKED_IN_PROFILE_DATA_COMPANY_ID varchar(45) NOT NULL,
LINKED_IN_PROFILE_DATA_VALUES_PK varchar(45) DEFAULT NULL,
LINKED_IN_PROFILE_DATA_NAME varchar(45) DEFAULT NULL,
PRIMARY KEY (LINKED_IN_PROFILE_DATA_COMPANY_ID),
KEY FK_VALUES_PK_idx (LINKED_IN_PROFILE_DATA_VALUES_PK)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Insert query :
insert into linked_in_profile_data_company
values(1111,'XYZ','ed1ee991-4d14-11e7-b5d8-5d15c209e35f');
Note : "ed1ee991-4d14-11e7-b5d8-5d15c209e35f" value is present in the parent table.
PHP upload form used to work now suddenly doesn't without a change to the file
Best Authentication and Industrial Practise logging Mechanism in PHP
Laravel echo server - how to update data in a presence channel?
How to use like clause in Laravel when we are using Raw SQL ?
How to auto login a website using windows authentication on intranet?
Display information of 1 table from 2 columns in the the search results. (PHP - Laravel)
Any Wrong with $get command here.. no error diplayed so do no result displayed
I have the below code all indications show it is working I get the "Sucess" message and the echos within the storeData() function are showing the correct informationHOWEVER the data is not being store in the Mysql database, nothing is happening
Lets say I have a Table tbl_Room with a column taken (boolean) and a Customer wants to rent this room for a short period
I have a question on how to search 2 MySQL database tables using PHPI was able to display and search one table as shown below
I am trying to build the source for thenet connector c# in Visual Studio 2017