json encode pour le futur
This commit is contained in:
parent
08284a2263
commit
bec115bae9
@ -40,8 +40,8 @@ class IndexController extends Zend_Controller_Action
|
||||
if (!empty($id)){
|
||||
$db = Zend_Registry::get('db');
|
||||
$commandesM = new Application_Model_Commandes($db);
|
||||
$row = $commandesM->find($id);
|
||||
echo $row->nbLigneT;
|
||||
$row = $commandesM->find($id);
|
||||
echo json_encode(array('nbLigneT' => $row->nbLigneT));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ function updateInfo()
|
||||
var objet = $(this);
|
||||
var id = $(this).attr('id');
|
||||
$.getJSON('/index/getinfo', {id: id}, function(data){
|
||||
if (data!=''){ objet.find('td.ligne').text(data); }
|
||||
if (data!=''){ objet.find('td.ligne').text(data.nbLigneT); }
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user