At 10:13 05/04/00 +0200, you wrote:
Currently I must concentrate on finishing scanwel, (so as to get paid!),
then I will look into it.
The trick probably lies in carrying the query over from one incantation to
the next.
Perhaps the 'chunk' code could go into a function, but I am inclined to
have it as an include. I will look into it as soon as I can
>Hi
>
>I have the same problem. Maybe somebody that is a "guru" :) in php/mysql,
>could write a new search script. Using "like" conditions instead of eregi.
Using searches entered by the user works well with large amounts of loosely
structured data, but if you want to lead the user to what they are looking
for in as few clicks as possible then the department method is better.
Nothing drives people away faster than 'Sorry, your search did not match
anything'. Tell 'em what to look for.
If you look at a succesful e-commerce site such as simply.co.uk that is how
it is done.
It is probably a good idea to define which fields are primarily for display
and which fields are searcheable or both. I have defined 2 variables;
$Displayfields and $Searchfields.
eg
/* fields used for display. eg
"SELECT " . $Display_fields . " FROM item WHERE " etc
*/
$Display_fields = "
ID,
Name,
Description,
Thumbnail,
Graphic,
LargeGraphic,
Cat,
Range,
Type,
Size,
Prodcode,
Material1,
etc,
etc
";
/* fields used for searching. eg
$Query = "SELECT " . $Display_fields . " FROM item WHERE ";
$Query .= $Search_fields[0] . " LIKE ";
$Query .= "'" . $myIDinput . "' ";
$Query .= "OR " . $Search_fields[1] . " LIKE ";
$Query .= "'" . $myNameinput . "' ";
$Query .= "OR " . $Search_fields[2] . " LIKE ";
$Query .= "'%" . $myDescriptioninput . "%' ";
and so on. ( I haven't run this past sql, but it should work bar any syntax
glitches. Please note the percentage signs, these will allow partial
searches. It's all in the mysql manual, so RTFM guys!
*/
$Search_fields = "
ID,
Name,
Description,
Cat,
Range,
Type,
Size,
Material1,
etc
";
If you don't want to mess with global_settings then make a custom_settings
file and include it in index.php3
>
>Thanks
>
>Tom
>
>
>
>----- Original Message -----
>From: Andre M�ller <[EMAIL PROTECTED]>
>To: FreeTrade <[EMAIL PROTECTED]>
>Sent: Wednesday, April 05, 2000 9:10 AM
>Subject: [FreeTrade] again: search result
>
>
>> Hi everybody @list,
>> I have to come up with a topic that was discussed yesterday already: Forward
>> and back buttons in search_results. I tried to understand the help replies
>> but didn't really manage to do it. And I think in the department section the
>> situation is quite different than in search_results where all the data is
>> fetched from db, but not all the results are matching the users query. I
>> tried to do something myself, but my solution is very awkward and not really
>> working. I had to always append all the query strings to the url for not to
>> loose all the users search input while going forward and backwards. And I
>> really have problems with loosing content of variables...just all these
>> beginners problems.
>>
>> Thanks for any help
>>
>> Andre
>>
>>
>>
>> ------------------------------------------------------------
>> To subscribe: [EMAIL PROTECTED]
>> To unsubscribe: [EMAIL PROTECTED]
>> Site: http://www.working-dogs.com/freetrade/
>> Problems?: [EMAIL PROTECTED]
>>
>
>
>
>------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Site: http://www.working-dogs.com/freetrade/
>Problems?: [EMAIL PROTECTED]
bye :-)=
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]