The combination of bind_col() and fetchrow_arrayref() looks suspicious. So do you want a reference to an array containing the data or do you want to set the bound variables? I believe you should use $dly1->fetch() instead of $dly1->fetchrow_arrayref().