the first one
Code: Select all
mysql_select_db($database_hostprop, $hostprop);
$query_rsPayment = "SELECT payment_id, payment_userid, payment_paid_timestamp, payment_amount_paid, payment_type, payment_transaction_status FROM host_payments WHERE host_payments.payment_created_timestamp LIKE '%2014%' ORDER BY payment_id DESC";
$rsPayment = mysql_query($query_rsPayment, $hostprop) or die(mysql_error());
$row_rsPayment = mysql_fetch_assoc($rsPayment);
$totalRows_rsPayment = mysql_num_rows($rsPayment);
$totalWithoutFees = 0;
$totalWithFees = 0;
Code: Select all
$weeksUserID = $row_rsPayment['payment_userid'];
mysql_select_db($database_hostprop, $hostprop);
$query_rsWeeks = "SELECT * FROM plus_signup WHERE userid = '$weeksUserID'";
$rsWeeks = mysql_query($query_rsWeeks, $hostprop) or die(mysql_error());
$row_rsWeeks = mysql_fetch_assoc($rsWeeks);
$totalRows_rsWeeks = mysql_num_rows($rsWeeks);
Code: Select all
<?php do {
$paid = $row_rsPayment['payment_amount_paid'];
$fees = 21;
$totalLessFees = $paid - $fees;
$row_rsPayment['payment_type'];
$row_rsWeeks['prop_id'];
?>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>ID</td>
<td>Customer Name</td>
<td>Prop ID</td>
<td>Amount </td>
</tr>
<tr>
<td><?php echo $row_rsPayment['payment_id']; ?></td>
<td><?php echo $row_rsPayment['payment_userid']; ?></td>
<td><?php echo $row_rsWeeks['prop_id']; ?></td>
<td><?php echo DoFormatCurrency($totalLessFees, 2, ',', '.', '£ ') ?></td>
</tr>
</table>
<?php
$totalWithoutFees += $totalLessFees;
$totalWithFees += $row_rsPayment['payment_amount_paid'];
$totalFees += $lessFees;
} while (($row_rsPayment = mysql_fetch_assoc($rsPayment)) && ($row_rsWeeks = mysql_fetch_assoc($rsWeeks))); ?>
Code: Select all
} while (($row_rsPayment = mysql_fetch_assoc($rsPayment)) && ($row_rsWeeks = mysql_fetch_assoc($rsWeeks)));thanks in advance