I have a website that updates its data every day (a real estate site)... last month I hired a developer from here to make a change to remove certain listings from the site...
The developer made the changes BUT apparently there was a problem we missed that I need fixed...
I need this fixed asap SO you must be available today...
I am getting errors like this:
Record 1 (331092358 - F1234104) - Area 3010 - 97 features
DBIx::Class::ResultSet::update_or_create(): DBI Exception: DBD::mysql::st execute failed: Column 'prop_id' cannot be null [for Statement "INSERT INTO features ( code, name, prop_id, value) VALUES ( ?, ?, ?, ? )" with ParamValues: 0='90', 1='Front Exposure', 2=undef, 3='North'] at cgi-bin/[login to view URL] line 551
here is a sample of the affected code: (line 551 is "$prop->features->update_or_create( {")
***START***
foreach my $prop ( $rs->all ) {
debug( $prop->id . " - " . $prop->feature(157) );
$prop->delete;
debug( " removed\n" );
delete_photos( $prop );
}
}
sub set_feature {
#my $prop_id = shift;
my $prop = shift;
my $rec = shift;
#$features_rs->update_or_create( {
eval {
$prop->features->update_or_create( {
name => $rec->{name},
code => $rec->{code},
value => $rec->{value},
prop_id => $rec->{prop_id},
} );
};
warn $@ if $@;
}
sub delete_photos {
my $prop = shift; of the code with the problem...