Terminé

[login to view URL] checkbox select all passes table data via ajax to a php file and the php file do a change in the mysql datatable with dependent on the ajax data

I delevoped a datatable and I am using [login to view URL] with this checkbox plugin: [login to view URL] and this file structure [login to view URL]

So what I need now are some tiny code snippets in a [login to view URL] file and in the [login to view URL] via jquery that perform some specific mysql actions FOR ALL SELECTRED ROWS OVER ALL PAGES after pressing different submit buttons.

When you press the main drop down menu („Mass Select Operations“) on my live example page [login to view URL] you will find all the specific submit buttons on the right, with the specific actions on the left.

So the first one should update the value of the mysql column „forsale“ in the mysql table to the value 1 after pressing it for all rows that have a selected checkbox.

I tried to do it with the following code in the [login to view URL] to test it with a single mysql change:

$(document).on('submit','#mass_putonsale2', function(e){

[login to view URL]();

show_loading_message();

var form = this;

var rows_selected = [login to view URL](0).[login to view URL]();

// Iterate over all selected checkboxes

$.each(rows_selected, function(index, rowId){

// Create a hidden element

$(form).append(

$('<input>')

.attr('type', 'hidden')

.attr('name', 'id[]')

.val(rowId)

);

}

);

var form_data_putonsale = $(form).serialize();

var request = $.ajax({

url: '[login to view URL]',

cache: false,

data: form_data_putonsale,

dataType: 'json',

contentType: 'application/json; charset=utf-8',

type: 'get'

});

hide_loading_message();

and with the following code in [login to view URL]

elseif ($job == 'mass_putonsale'){

$query = "UPDATE cards SET forsale = 1 WHERE id = '"; mysqli_real_escape_string($conn,$_GET['id'][0]) ."'";

$query = mysqli_query($conn, $query);

}

But it is not working at all … so this would be the first specific tiny job and many more would come after this one for sure ...

I can give you a view access to all live files, so you are able to get a quick overview before we do the job via [login to view URL] .

here is a part of the process that is working, but I am not able to edit it to my needs, so the whole process is working.

best greetings

Compétences : AJAX, Javascript, jQuery / Prototype, MySQL, PHP

en voir plus : datatables load on scroll, jquery datatable lazy loading example, datatables slow rendering, datatables performance large tables, datatables deferrender not working, jquery datatables load large data, select multiple rows with checkboxes using jquery datatable, jquery datatable performance improvement, display table created mysql webpage, mysql ajax php filter table, several table updates mysql, create table filetxt mysql, vbulletin change mysql server, triggers find avg table save mysql, net query sql mobile table example, access multi select form table, asp net generate image html table, matrix table design mysql, select table search mysql php, wordpress mysql php select custom table

Concernant l'employeur :
( 2 commentaires ) Bad Kreuznach, Germany

Nº du projet : #18122293

Décerné à:

Panggumsok

Dear sir! I read your code carefully. I think it is not neccessary to add hidden element. You could get checked all rowids at once without using hidden and then you could edit mysql datas with these rowids by using Plus

%selectedBids___i_sum_sub_4% %project_currencyDetails_sign_sub_5% EUR en 1 jour
(10 Commentaires)
4.5

3 freelance font une offre moyenne de €15 pour ce travail

manishuser

I can fixed this problem I have experience in php,J's, database

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 2 jours
(0 Commentaires)
0.0
starhadi

kindly ignore the bid amount & time-line, it's just a placeholder, as i still need to receive more detailed requirements for you to finalized it. ------ Dear sir, I have read you project description and understand the Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(0 Commentaires)
0.0