Hi
I have two tables.
The first one, "services", contains the services
service_id = 1
service = service_one
service_id = 2
service = service_two
an so on
In the other table, "orders", I've stored the services that clients have ordered:
order_id = 1
server_id = 1
client_id = 54
order_id = 2
service_id = 1
client_id = 54
and so on
I retrived the posts, already ordered and placed in the table "orders"
So far I have come.
<?php
$ordered = mysql_query("SELECT * FROM services, orders
WHERE
services.service_id = orders.service_id AND
orders.client_id = '".$_GET['id']."' ");
while ($order = mysql_fetch_array($ordered))
{
echo ' <tr>';
echo ' <td>';
echo ''.$order['service'].'</td>';
echo ' <td><input type="checkbox"';
if ($order['service_id'] != 0)
{
echo 'checked = "checked"';
}
echo 'name="service" value="'.$order['service_id'].'"></td>';
echo ' </tr>';
}
?>
What I need is to retrive a COMPLETE LIST of the services in which the already ordered posts are checked in the checkboxes
(I have modified the code to simplify my question)
Thanks for any assistance

