OK, we're back to a mysql error.
the following code will print to the screen, the actual values for each col. But when I tell it to insert to the db, it makes hundreds of records have the same $serial.
and it gives me an error of
my $input_machine_data=$dbhconnect->prepare("INSERT into customer_machines
values (?,?,?,'','' ) ")
or die "prepare Failed on: $srv\n\t$DBI::errstr\n";
I know what I am about to write seems to argue with mysql but, I have no duplicate rows. The customer_id PK is part of a composite key and so would be different anyway with the other values changing - wouldn't it?
Cannot add or update a child row:
a foreign key constraint fails
CONSTRAINT `customer_fk` FOREIGN KEY (`customer_id`)
REFERENCES `customer_details` (`customer_id`)
) at transfer_from_main_table_to_others.pl line 71.
The customer_id is different in every record anyway since it is being retrieved from the source table.
I must be missing something ~ perhaps that the customer_id value is 'sticking' just like the $serial var.