title: Delete row wordpress custom database table
body: <p>I have a page showing all transactions made via paypal on my site. I want to add a button that could delete that specific row.</p>
  
  <p>The transaction id is unique.</p>
  
  <p>how would I be able to when user clicks on the button to delete just that row? also to run a jquery alert to confirm delete?</p>
  
  <p>my code:</p>
  
  <pre><code>&lt;table class"widefat"&gt;
  &lt;?php  global $wpdb;
      $result = $wpdb-&gt;get_results ( "SELECT * FROM wp_donations" );
      if (!$result){?&gt;
      &lt;tr&gt;
      &lt;td&gt;There are no donations to show&lt;/td&gt;
      &lt;/tr&gt;
  &lt;?php }else{?&gt; 
  &lt;thead&gt;
  &lt;tr&gt;
   &lt;th&gt;Name&lt;/th&gt;
   &lt;th&gt;Email&lt;/th&gt;
   &lt;th&gt;Phone Number&lt;/th&gt;
   &lt;th&gt;Address&lt;/th&gt;
   &lt;th&gt;Amount&lt;/th&gt;
   &lt;th&gt;Method&lt;/th&gt;
   &lt;th&gt;Date&lt;/th&gt;
   &lt;th&gt;Transaction ID&lt;/th&gt;
   &lt;th&gt;&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;?php foreach ( $result as $print )   {?&gt;
      &lt;tr&gt;
      &lt;td&gt;&lt;?php echo $print-&gt;name;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $print-&gt;email;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php $phones = $print-&gt;phone; if($phones == 0){echo 'No Number Provided';}else{echo $phones;}?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $print-&gt;address;?&gt;&lt;/td&gt;
      &lt;td&gt;$&lt;?php echo $print-&gt;amount;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $print-&gt;method;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $print-&gt;dates;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $print-&gt;txid;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="button" id="&lt;?php echo $print-&gt;txid;?&gt;" class="delete" title="Delete" value="delete" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
          &lt;?php }?&gt;
         &lt;/table&gt;
  </code></pre>