title: Cannot add or update a child row a foreign key constraint fails
body: <h1>1452 - Cannot add or update a child row: a foreign key constraint fails (<code>projectphp1707</code>.<code>#sql-e6c_cd</code>, CONSTRAINT <code>#sql-e6c_cd_ibfk_1</code> FOREIGN KEY (<code>order_id</code>) REFERENCES <code>tbl_order</code> (<code>order_id</code>))</h1>
  
  <p>table 1:
     <a href="https://i.stack.imgur.com/kA0FZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kA0FZ.png" alt="enter image description here"></a></p>
  
  <p>table 2:
  <a href="https://i.stack.imgur.com/hWCbP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hWCbP.png" alt="enter image description here"></a></p>
  
  <pre><code>CREATE TABLE `tbl_order` (
    `order_id` int(11) NOT NULL,
    `user_id` int(11) DEFAULT NULL,
    `cus_fullname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
    `total_price` double DEFAULT NULL,
    `active` tinyint(1) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  CREATE TABLE `tbl_payment` (
    `pay_id` int(50) NOT NULL,
    `pro_id` int(15) NOT NULL,
    `pay_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `pay_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `pay_adress` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `pay_cardname` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `pay_cvc` int(3) NOT NULL,
    `pay_number` text COLLATE utf32_unicode_ci NOT NULL,
    `pay_mm` int(2) NOT NULL,
    `pay_yyyy` int(4) NOT NULL,
    `pay_totals` varchar(255) COLLATE utf32_unicode_ci NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;
  </code></pre>