jQuery and mySql index don't match

jQuery and mySql index don't match

I have a problem with index-ing. In jQuery it's zero based, in mySql it starts with 1. It's probably impossible to make mysql index from 0, so I have to fix it in the jQuery code, which folllows:

  1. $(document).ready(function(){ 
  2.   
  3.      $("#tekst a").click(function() {
  4.      var index = $('#tekst a').index(this);
  5.      var klik = $('#glosy p:eq(' + index + ')').html().replace('(','').replace(')','');
  6.      var addklik = ++klik;
  7.      $.ajax({ 
  8.              type: "POST", 
  9.              url: "ajax2.php", 
  10.              data: 'addklik=' + addklik + '&index=' + index,
  11.              success: function(data){ 
  12.                 $('#glosy p:eq(' + index + ')').text('('+addklik+')');
  13.                 
  14.                 }
  15.              });
  16.    
  17.      return false;
  18.      });
  19.    
  20. });
Any ideas?