我有一个鼠标悬停功能,可以根据每行的值从数据库中获取数据。 但是,它为所有行返回相同的值

I need help. I am experimenting with J QUERY for the first time. I have a mouseover function to get and display data from the database based on the row id. However, I am getting the same value for all the rows. Thanks!

 while($stmt->fetch()){?>

                <td class="other">
                    <input type="hidden"  class="rowid"  value="<?php echo $id ?>"/>
                    <?php echo round($other,2); ?>
                   </td>

        <?php             
        }
        ?>
        //jquery code:
        $(document).ready(function(){
            $(".other ").mouseover(function(){
                var rowid = $('#rowid').val();
                $.get('other.php',{postrowid:rowid},
                    function(data)
                        {
                      $('#otherResult').html(data);
            $('#otherResult').show();
            $(".other").mouseout(function(){
            $('#otherResult').hide();
        });
                    });
                }); 
// Change:
var rowid = $('#rowid').val();

// To:
var rowid = $('input', this).val();

Sidenote: Instead of using a hidden field, you can add data to related tags using HTML5 data-* attribute:

<td class="other" data-id="<?php echo $id ?>">
    <?php echo round($other,2); ?>
</td>