I met some trouble in my ajax request.
In fact I do not know how to ou many records.
I've tried this :
$rqt = "SELECT a,b,c from table";
$res = mysql_query($rqt);
while ($data = mysql_fetch_assoc($res)):
$objet = $data;
endwhile;
//requettage
return $objet;
but it out to php only one rows even if I have many records in database.
Second trouble is for display that records.
I've tried this in jquery
$.ajax({
type: "POST",
url: "requetes_ajax/fetch_debours_detail.json.php",
data: "groupe="+groupe_debours,
success: function(data){
$('.remove').remove()
console.log(data);
$.each(data, function (key, value) {
$('#fetchdebours tr:last').after('<tr class="remove"><td>'+data.libelle_debours+'</td><td>'+data.date+'</td><td>'+data.debours_montant_ht_tva+'</td><td>'+data.debours_montant_ht_no_tva+'</td><td>'+data.debours_montant_ttc+'</td></tr>')
//alert(key + ': ' + value);
});
}
});
for that things the trouble I have is that instead of displaying all records in one row, it fill all items horizontally and also vertically so I have as many rows as I have column.
Anykind of help will be much appeciated