Re: [PHP-DB] query selection

2003-06-16 Thread CPT John W. Holmes
Okay... and? Do you have a question? Are you wanting us to write this for
free? Do you want bids on the project?

---John Holmes...

- Original Message - 
From: Ryan Holowaychuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 16, 2003 2:30 PM
Subject: [PHP-DB] query selection


I have a databae built, at the moment it has two tables.

The first table has 2 fields, an ID and description.  This is for a listing
of all the different samples that we have at the company.

When the user clicks on the description they want, it will open another page
that will show all the items that fit that description.

So in this case the first page shows:  Brochures, business cards, tickets,
etc

They then click on tickets I want it to show all the tickets that we have
done and then I will have a link from there they can click on and show all
the jobs in there.  but to even make it more complicated I only want it to
show the first job for that client based on the job number. (eg. Tickets
each client will have a back, front and inside to show) so when they click
on tickets they will see the teams we have done, and then from there they
can select a team. And then it will open all the examples they want in
there, and then if they click on the thumb it would go to a page I have set
up with the image at a large size.

Thanks
Ryan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] query selection

2003-06-16 Thread Ryan Holowaychuk
Sorry forgot to state the question.

No bids.  Looking for help.

the first list that is displayed has an ID for each product.  But when I
click on it, it goes to the next page but does not display the rest of the
products that are listed in the second table.

$query = SELECT  * FROM product_list  WHERE productid = id;

Id being the description ID that came off the first page.

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2003 11:43 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]

Okay... and? Do you have a question? Are you wanting us to write this for
free? Do you want bids on the project?

---John Holmes...

- Original Message - 
From: Ryan Holowaychuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 16, 2003 2:30 PM
Subject: [PHP-DB] query selection


I have a databae built, at the moment it has two tables.

The first table has 2 fields, an ID and description.  This is for a listing
of all the different samples that we have at the company.

When the user clicks on the description they want, it will open another page
that will show all the items that fit that description.

So in this case the first page shows:  Brochures, business cards, tickets,
etc

They then click on tickets I want it to show all the tickets that we have
done and then I will have a link from there they can click on and show all
the jobs in there.  but to even make it more complicated I only want it to
show the first job for that client based on the job number. (eg. Tickets
each client will have a back, front and inside to show) so when they click
on tickets they will see the teams we have done, and then from there they
can select a team. And then it will open all the examples they want in
there, and then if they click on the thumb it would go to a page I have set
up with the image at a large size.

Thanks
Ryan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] query selection

2003-06-16 Thread CPT John W. Holmes
 the first list that is displayed has an ID for each product.  But when I
 click on it, it goes to the next page but does not display the rest of the
 products that are listed in the second table.

 $query = SELECT  * FROM product_list  WHERE productid = id;

 Id being the description ID that came off the first page.

Well, 'id' should at least be a variable, right? I assume your links look
something like this:

http://www.yourdomain.com/page.php?id=X

where X is the 'id' number you want to pass to the above select statement.
If so, then you'd use:

$query = SELECT * FROM product_list WHERE productid = {$_GET['id']};
or
$query = SELECT * FROM product_list WHERE productid =  . $_GET['id'];

where $_GET['id'] is a variable containing the value passed in the URL. Make
sure you properly validate $_GET['id'] to make sure it's a valid ID (or at
least an integer) before you stick it in your SQL statement, also.

$id = (int)$_GET['id'];
$query = SELECT * FROM product_list WHERE productid = $id;

---John Holmes...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php