close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

inexact search

Thread began 10/20/2010 8:33 am by i.edwards384429 | Last modified 10/28/2010 12:18 pm by i.edwards384429 | 4403 views | 10 replies |

i.edwards384429

inexact search

Hi

Have a seaRCH Form created using the wizard with four search fields

name

type

price

LOA

berths

I need to make the last three fields not exact ie if someone types in

10000

I would like it to display 9000-11000 for example

How can I do this.

thanks

Ian

Sign in to reply to this post

Jason ByrnesWebAssist

you need to create 2 search parameters for each.

the two parameters will use the same form element and same column.
In the first one set the comparison to >= (Grater than or equal to)

in the second one set the comparison to <= (less than or equal to.

make sure to use the OR separator between them.

Sign in to reply to this post

i.edwards384429

Update

Hi Jason

ok as usual I'm struggling with this.

I have my search page which contains no server behaviours,

some session variable

WADA search form

and some server variables.

where do I find the option to add the search perameters or do I start again from scratch?

thanks

Ian

Sign in to reply to this post

Jason ByrnesWebAssist

the DataAssist Search server behavior is applied to the results page, not the search page.

Sign in to reply to this post

i.edwards384429

update

Hi Jason

not surprisingly this one is loosing me a bit.

if I open the datassist search behaviour is see what is shown on the attached jpeg.

The first option is for a type which is an exact name

the second is a price which I want to make +or minus 5000

the third is a length which I want to make + or - 10

the fourth is no of beds which I want to make + or - 2

Ok so I highlight the second one down and select edit.

my comparrison options are:

=
includes
begins with
end with

I can't see the >= or the <= to mention

Am I in the wrong menu?

thanks

Ian

Sign in to reply to this post

Jason ByrnesWebAssist

The Column type is set to text text. Greater than or equals can only be used if the column type is set to Number.

Sign in to reply to this post

i.edwards384429

update

Hi Jason

Ok I set it to number and can now begin to see where I'm going but (ok theres always a but)

I used and for the first perameter and set it to be less or equal to ( going well!!!!)

then I looked for where to put in my variance figure ie a price of 5000 + or - 500

I assume it goes in the filter section but they are all greyed out.

so I changed the type box to value and my greyout boxes still stayed greyed out.

What am I mssing out?

cheers

Ian

Sign in to reply to this post

Jason ByrnesWebAssist

you can giv it a variance the way you are trying to,


you can create a range

where you have 2 search fields and enter a minimum and maximum.

Sign in to reply to this post

i.edwards384429

update

Hi Jason

think I've got it;-)

the code I created is here and I've attatched the original and modified file.

The idea is that the selected price is returned itif it is within 5000 of the typed in figure.

can you take a look and tell me if I've suceeded as (to no surprise) it does not work for me.

thanks

Ian


<?php
$maxRows_WADAboats = 3;
$pageNum_WADAboats = 0;
if (isset($_GET['pageNum_WADAboats'])) {
$pageNum_WADAboats = $_GET['pageNum_WADAboats'];
}
$startRow_WADAboats = $pageNum_WADAboats * $maxRows_WADAboats;

mysql_select_db($database_conn_localhost, $conn_localhost);
$query_WADAboats = "SELECT id, dt_name, dt_type, dt_Price, dt_loa, dt_berths, dt_short_desc, dt_catch_phrase, dt_yearBuilt, dt_construction, dt_designer, dt_builder, dt_underwaterProfile, dt_engine, dt_lying, dt_boatImageThumbnail, dt_thumbnail_alt, dt_boatImage1, dt_image1_alt, dt_boatImage2, dt_image2_alt, dt_boatIimage3, dt_image3_alt, dt_boatImage4, dt_image4_alt, dt_boatImage5, dt_image5_alt, dt_long_desc, es_electricsDetails, ct_constructionDetails, wt_waterDetails, acc_cooker, acc_icebox, acc_curtains, acc_pws, acc_fws, acc_nonsmoke, acc_handbasin, acc_shower, acc_heads, acc_sink, acc_fridge, acc_hws, acc_cockpitShower, acc_microwave, acc_cabinHeating, accd_details, nav_compass, nav_log, nav_gps, nav_autopilot, nav_navlights, nav_wind, nav_echosounder, nav_vhfRadio, nav_chartPlotter, nav_stereo, nav_details, ed_fuelCapacity, ed_holdingTank, ed_waterCapacity, ed_LastSurvey, mech_engine, mech_engineHours, mech_waterCooled, mech_steering, mech_fuelComsumption, mech_cruisingSpeed, mech_maxSpeed, mech_details, dim_loa, dim_lwl, dim_beam, dim_draftMmin, dim_draftMax, dim_displacement, dim_headroom, dim_storage, rig_rig, dg_sailCover, dg_warps, dg_boathook, dg_swimLadder, dg_bimini, dg_sprayhood, dg_fenders, dg_swimPlatform, dg_instrumentCovers, dg_details, sft_gasDetector, sft_lifeBuoys, stf_emergencySteering, sft_saftHarness, stf_details, sails_reefMainsail, sails_headsail, sails_halyardWinches, sails_sheetWinches, sails_otherSails, sails_spinakerGear, sails_desc, brokerFirstName, brokerLastName, brokerCity, brokerZip, brokerRegistrationDate, brokerPhone, brokerMobile, brokerAddress, brokerAddress2, brokerState, brokerCountry FROM boats ORDER BY dt_Price ASC";
setQueryBuilderSource($query_WADAboats,$WADbSearch1,false);
$query_limit_WADAboats = sprintf("%s LIMIT %d, %d", $query_WADAboats, $startRow_WADAboats, $maxRows_WADAboats);
$WADAboats = mysql_query($query_limit_WADAboats, $conn_localhost) or die(mysql_error());
$row_WADAboats = mysql_fetch_assoc($WADAboats);

if (isset($_GET['totalRows_WADAboats'])) {
$totalRows_WADAboats = $_GET['totalRows_WADAboats'];
} else {
$all_WADAboats = mysql_query($query_WADAboats);
$totalRows_WADAboats = mysql_num_rows($all_WADAboats);
}
$totalPages_WADAboats = ceil($totalRows_WADAboats/$maxRows_WADAboats)-1;
?>

Attached Files
Desktop.zip
Sign in to reply to this post

Ray BorduinWebAssist

This post has been deleted.


Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...