Ciao a tutti, premetto che sono proprio un novellino di php, e mi servirebbe un aiuto se possibile.
Devo modificare un sito, o meglio una piccola parte di un sito.
Io ho una tabella dove in lato front end che mi estrapola i dati da un database e mi riporta il nome del cliente, il numero di targa, il numero di deposito il campo servizio associato e il campo note.
Vorrei cambiare il campo servizio associato con il campo del numero di telefono del cliente.
Il Codice Php è questo
<table width="700" border="0" cellspacing="0" cellpadding="0" class="inside">
<?php while($rowa=mysql_fetch_object($selapa)):
$queapo = "SELECT * FROM quotes where id = \"$rowa->quote_id\"";
$selapo = mysql_query($queapo);
$rowo = mysql_fetch_object($selapo);
if ($rowa->customer_id <> NULL) :
$queapc = "SELECT * FROM customers where id = \"$rowa->customer_id\"";
$selapc = mysql_query($queapc);
$rowc = mysql_fetch_object($selapc);
$cli = $rowc->name." ".$rowc->surname." - id ".$rowc->id;
else:
if ($rowo->ext_name <> "") :
$cli = $rowo->ext_name;
else:
$cli = $rowo->ext_mail;
endif;
endif;
if ($rowa->quotes_items_id <> NULL) :
$queapr = "SELECT * FROM quotes_items,services where quotes_items.id = \"$rowa->quotes_items_id\" and service_id = services.id";
$selapr = mysql_query($queapr);
$rowr = mysql_fetch_object($selapr);
$serv = $rowr->description;
else:
$serv = " ";
endif;
?>
<tr>
<td width="121" class="div_td005ap"><?php if ($rowo->dep_code <> ""): ?><font color="#CC0000"><?php endif; ?><?php print $cli; ?><?php if ($rowo->dep_code <> ""): ?></font><?php endif; ?></td>
<td width="77" class="div_td005ap"><?php if ($rowo->dep_code <> ""): ?><font color="#CC0000"><?php endif; ?><?php print $rowa->name." ".$rowa->surname; ?><?php if ($rowo->dep_code <> ""): ?></font><?php endif; ?></td>
<td width="60" class="div_td005ap"><?php if ($rowo->dep_code <> ""): ?><font color="#CC0000"><?php endif; ?><?php print $rowo->car_lcplate; ?><?php if ($rowo->dep_code <> ""): ?></font><?php endif; ?></td>
<td width="72" class="div_td005ap"><font color="#CC0000"><?php print $rowo->dep_code; ?></font></td>
<td width="132" class="div_td005ap"><?php if ($rowo->dep_code <> ""): ?><font color="#CC0000"><?php endif; ?><?php print $serv; ?><?php if ($rowo->dep_code <> ""): ?></font><?php endif; ?></td>
<td width="160" class="div_td005ap"><?php if ($rowo->dep_code <> ""): ?><font color="#CC0000"><?php endif; ?><?php if ($rowo->notes <> "") print $rowo->notes; if ($rowo->notes <> "" and $rowo->car_desc <> "") print " - "; if ($rowo->car_desc <> "") print $rowo->car_desc; ?><?php if ($rowo->dep_code <> ""): ?></font><?php endif; ?></td>
sapreste aiutarmi indicandomi la riga da cambiare per far uscire il numero di telefono e non più il servizio associato al cliente??
grazie mille