How to update data in datebase using jquery, ajax?
How to update data in datebase using jquery, ajax?

 - My database: id, news, visited (default = 0)

This is my database query:

    UPDATE news SET visited = 1 WHERE id=$id


I would like change the value from 0 to 1 after clicking url.

My try:

    $('a').bind('click', function(){
        $.ajax...
    });
How to update data in datebase using jquery, ajax?
===

How to update data in datebase using jquery, ajax?

 - My database: id, news, visited (default = 0)

This is my database query:

    UPDATE news SET visited = 1 WHERE id=$id


I would like change the value from 0 to 1 after clicking url.

My try:

    $('a').bind('click', function(){
        $.ajax...
    });