Re: Capturing a sql query
| From: | Stuart Felenstein | Date: | Thu, 30 Sep 2004 10:40:41 +0000 |
| Subject: | Re: Capturing a sql query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36474@lists.php.net to get a copy of this message | ||
Serialized because it is easier to store ?
Stuart
--- M Saleh EG <m.saleh.eg@gmail.com> wrote:
> I'd recommand u to use a serialized variable saved
> in ur database.
> As in the an array of keywords saved in an
> serialized variable once
> the form is submited to save the query.
> e.g.
> $searchQuery = array();
> $searchQuery["Keywords"]= $_POST["keyword"];
> $searchQuery["JobCategory"]= $_POST["category"];
> $searchQuery["Pay"]=$_POST["pay"];
> ...
> ...
> ...
> $s_sq=serialize($searchQuery);
>
> then save $s_sq into ur DB.
>
> now... u should have a page that shows the saved
> searches right? now
> by clicking on the saved search u should grab the
> data saved and query
> ur database according to the query saved in $s_sq.
>
> Simple isnt it?
>
>
> About emailing the search agent results. I'd prefer
> pluging that into
> ur mailing-list solutions. I mean try to query every
> user's searches
> before sending an email so ull email users proper
> jobs according to
> their searches and criterias.
>
> Need explanation?
> Hope that was of a help.
>