in reply to Re: Perl/Tk hang when conecting to Remote MySQL Server
in thread Perl/Tk hang when conecting to Remote MySQL Server

Thank you for both of you this lines i include fixed out my problem

$query="SELECT count(*) FROM vegetables WHERE vegetable LIKE '%$sv%' $mw->update(); my $results = $mw->Label( -textvariable => \$result_string )->pack; fetchrow_array

thanks for handling out the input in just 1 scalar variable that worked out also! Problem solved!

Replies are listed 'Best First'.
Re^3: Perl/Tk hang when conecting to Remote MySQL Server
by graff (Chancellor) on Dec 27, 2014 at 19:37 UTC
    In your latest snippet here, I think the "update()" call isn't really doing anything. In one sense, that's not a problem, because it isn't needed at all - you can delete that line and the script will work just the same.

    If the "update()" call were necessary (which in this case it isn't), you'd want to do it after executing your query, getting the values from the database, and assigning them to variables.