本文整理汇总了PHP中Commande::fetch_object方法的典型用法代码示例。如果您正苦于以下问题:PHP Commande::fetch_object方法的具体用法?PHP Commande::fetch_object怎么用?PHP Commande::fetch_object使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Commande
的用法示例。
在下文中一共展示了Commande::fetch_object方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trad
echo trad('MONTANT_euro', 'admin');
?>
</th>
<th><?php
echo trad('STATUT', 'admin');
?>
</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$commande = new Commande();
$query = "SELECT * FROM " . Commande::TABLE . " WHERE client='" . $client->id . "' ORDER BY date DESC";
$resul = $commande->query($query);
while ($resul && ($cmd = $commande->fetch_object($resul, 'Commande'))) {
$statutdesc = new Statutdesc();
$statutdesc->charger($cmd->statut);
switch ($cmd->statut) {
case '1':
$trClass = 'warning';
break;
case '4':
$trClass = 'success';
break;
case '5':
$trClass = 'error';
break;
default:
$trClass = 'info';
break;
示例2: lister_commandes
function lister_commandes($critere, $order, $debut, $nbres, $search = '')
{
$commande = new Commande();
$i = 0;
$query = "select * from {$commande->table} where 1 {$search} order by {$critere} {$order} limit {$debut},{$nbres}";
$resul = $commande->query($query);
while ($resul && ($row = $commande->fetch_object($resul, 'Commande'))) {
$client = new Client();
$client->charger_id($row->client);
$statutdesc = new Statutdesc();
$statutdesc->charger($row->statut);
$devise = new Devise();
$devise->charger($row->devise);
$total = formatter_somme($row->total(true, true));
$date = strftime("%d/%m/%y %H:%M:%S", strtotime($row->date));
$fond = "ligne_" . ($i++ % 2 ? "claire" : "fonce") . "_rub";
?>
<ul class="<?php
echo $fond;
?>
">
<li style="width:142px;"><?php
echo $row->ref;
?>
</li>
<li style="width:104px;"><?php
echo $date;
?>
</li>
<li style="width:200px;"><?php
echo $client->entreprise;
?>
</li>
<li style="width:200px;"><a href="client_visualiser.php?ref=<?php
echo $client->ref;
?>
"><?php
echo $client->nom . " " . $client->prenom;
?>
</a></li>
<li style="width:59px;"><?php
echo $total;
?>
<?php
echo $devise->symbole;
?>
</li>
<li style="width:70px;"><?php
echo $statutdesc->titre;
?>
</li>
<li style="width:40px;"><a href="commande_details.php?ref=<?php
echo $row->ref;
?>
">éditer</a></li>
<?php
if ($row->statut != Commande::ANNULE) {
?>
<li style="width:35px; text-align:center;"><a href="#" onclick="supprimer('<?php
echo $row->id;
?>
'); return false;"><img src="gfx/supprimer.gif" width="9" height="9" border="0" /></a></li>
<?php
}
?>
</ul>
<?php
}
}