Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

looping variable

$
0
0

Im trying to loop a variable to extract each customer out the database however it just repeats the same customer

 

any help would be greatly appreciated.

$completed_orders=mysql_query("SELECT * FROM repair_orders JOIN (serviced_vechicles,Customers) ON repair_orders.car_id=serviced_vechicles.car_id AND Customers.customer_id=serviced_vechicles.customer_id WHERE repair_status='0' ORDER BY customer_name DESC");
$existingCustomers=mysql_num_rows($completed_orders);
echo $existingCustomers;
$fetch_complete=mysql_fetch_array($completed_orders);
$customer=$fetch_complete;

$requested_customers = 
'<a href="">';
'<tr>
<td>'.$customer['customer_name'].'</td>
<td>'.$customer['year'].'</td>
<td>'.$customer['make'].'</td><
td>'.$customer['model'].'</td>
<td>'.$customer['date'].'<td>
</tr>';
'</a>';

How do I loop through ^^^^^ $requested_customers


Viewing all articles
Browse latest Browse all 13200

Trending Articles