Note that there are some explanatory texts on larger screens.

plurals
  1. POMysql Insert into to copy data
    primarykey
    data
    text
    <p>i try to copy records from one table to another table of other database</p> <p>what i try</p> <pre><code> $sql13 = " INSERT INTO `archive_accounts`.`bank_info` SELECT * FROM `pb_accounts`.`bank_info` WHERE `emp_id` = '$seid' "; mysqli_query($dbac,$sql13); </code></pre> <p>and many other queries all of them run properly but </p> <pre><code> $sql21 = " INSERT INTO `archive_accounts`.`compensation` SELECT * FROM `pb_accounts`.`compensation` WHERE `emp_id` = '$seid' "; mysqli_query($dbac,$sql21) or die(mysqli_error($dbac)); </code></pre> <p>and</p> <pre><code> $sql17 = " INSERT INTO `archive_accounts`.`c_allowance` SELECT * FROM `pb_accounts`.`c_allowance` WHERE `emp_id` = '$seid' "; mysqli_query($dbac,$sql17) or die(mysqli_error($dbac)); </code></pre> <p>not copying any row and not throwing any error the table structure are same when i use phpmyadmin to run query it run properly</p> <p>table structure of <code>pb_accounts</code>.<code>c_allowance</code></p> <pre><code>id int(11) emp_id int(11) allowance decimal(9,2) </code></pre> <p>date date</p> <p>table structure of <code>pb_accounts</code>.<code>c_allowance</code> and <code>archive_accounts</code>.<code>c_allowance</code></p> <pre><code>id int(11) emp_id int(11) allowance decimal(9,2) </code></pre> <p>date date</p> <p>structure of <code>archive_accounts</code>.<code>compensation</code> and <code>pb_accounts</code>.<code>c_allowance</code></p> <pre><code> id int(11) emp_id int(11) amount int(11) approved_by varchar(75) detail varchar(100) date date </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload