title: Mysql data retriving in perl script
body: <pre><code>Connect with mysql and retrive data from the table.
  
    my $db ="JJusers";
    my $user ="root";
    my $password ="abcdef";
    my $host ="localhost";
  
    my $dbh =DBI-&gt;connect("DBI:mysql:$db:$host",$user,$password);
  
    my $uDt = $dbh-&gt;prepare("select Username,Password from Users");
    my $rv = $uDt-&gt;execute;
  
    print "&lt;script&gt;alert($rv)&lt;/script&gt;";
  </code></pre>
  
  <p>When I execute this code I am getting the result as <code>1</code>. In database the data stored as:</p>
  
  <pre><code>1, jj, pp(SNO, USERNAME,PASSWORD)
  </code></pre>
  
  <p>Why isn't it getting the right data?</p>