php - cannot get column value from a query -
i want set value of text input value of column database :
<input name="clt_cin_pass" id="clt_cin_pass" type="text" maxlength="25" placeholder="cin/passeport" value="{{data.clt_cin_pass}}"/>
the data
variable gotten controller
:
<?php use phalcon\mvc\controller; class referentielclientcontroller extends controller { ... public function modifierclientaction($id){ $this->view->titre = 'modification de client'; $critere = array(); $critere["clt_id"] = $id; $enreg = client::listerclient($critere); $this->view->data = $enreg; return $this->view->pick("client/client"); } ... } ?>
the model client :
<?php use phalcon\mvc\model; use phalcon\mvc\model\query; class client extends model { function listerclient($critere) { // instantiate query $ssql = " select c.clt_id clt_id,c.clt_cin_pass clt_cin_pass,concat_ws(' ',c.clt_nom,c.clt_prenom) noms,c.clt_tel clt_tel, c.clt_adresse clt_adresse,c.clt_comment clt_comment client c 1 = 1 "; if(isset($critere["clt_id"]) && $critere["clt_id"] != "") { $ssql .= "and c.clt_id = ' " . $critere["clt_id"] . "' "; } $query = new query($ssql,$this->getdi()); // execute query returning result if $ret = $query->execute(); return $ret; } } ?>
the query returns row , @ runtime field has no value ! how populate field's value ?
Comments
Post a Comment