Re: Newbie question, Which way is best?
| From: | George J | Date: | Wed, 19 Mar 2008 20:45:19 +0000 |
| Subject: | Re: Newbie question, Which way is best? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271849@lists.php.net to get a copy of this message | ||
Hi Daniel,
> WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]!
As a newbie I just have to ask why. I suspect you're going to say it gives
the table and field names used in my database. I'm not really aware of all
the possible avenues that this method might open up. It just feels wrong to
include these details. This is the reason I've asked for help.
The form part of the script works fine so can we ignore that or does it
impact on the pagination code that I'm having trouble with.
When the form calls the script it passes all the parameters that the script
uses to construct a SELECT query. This works fine.
When the pagination calls the script it passes a new page number. This works
fine but is where my limited experience lets me down. I need to pass the
SELECT query, as is, back to the same script with a way to change just the
LIMIT part of the query. Changing the LIMIT parameters simple lets me
display another page of the returned query. I can do this change prior to
call but what options have I on including the query in my call. Could I
camouflage the query parameters in an array for example?
George