ranjan_jajodia has asked for the wisdom of the Perl Monks concerning the following question:
In the above 'if loop', the condition always return true even if the id is not present in the table. Am i misunderstanding the use of 'has_selected_record()'? If yes how do i know whether the query has returned result or not? I understand I can create an iterator and get the exact result but i don't think that is needed because$mysql->query(q{select id from id_table where id = '1'}); if ( $mysql->has_selected_record) { #do something; } else { #do something else }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using has_selected_record() of Net::MySQL
by critter (Acolyte) on Aug 11, 2005 at 11:54 UTC | |
by ranjan_jajodia (Monk) on Aug 11, 2005 at 13:39 UTC |