I used the manual to build it but the page just reloads when I choose an option. My guess is that you aren't allowed to put numbers in the value statement?
field to search is called property_size
< form action="search.php?action=filled=1&whichtype=items" method="post" > Search for a property that is: < select name="property_sizecondition"> < option value="< 3000">Under 3,000 sq. ft</option> < option value="between 3000,5000">3,000 to 5,000 sq. ft.</option> < option value="between 5000,10000">5,000 to 10,000 sq. ft.</option> < option value="between 3000,5000">3,000 to 5,000 sq. ft.</option> < option value="> 10000">Over 10,000 sq. ft. </option> < /select> < input type="hidden" name="property_sizesearch" /> < input type="submit" value="Find" class="button" />
</form>
property_size is chosen as a valid field to search in settings. ------------ Update: I'm also getting errors for searches that were originally a part of the advancedsearch.tpl.
I know that one item has over 100 visits (hits) so I plug in "find item where hits are < 100" to find the other item that hasn't been visited as often.
I get this error: (I'm getting it on quite a few of the searches listed on advancedsearch.tpl, now that I've had time to test them)
An error occoured at www.reellocations.com/dir/s...r&filled=1&whichtype=items on 2008-09-22 02:19:23. Please relay this data to support. Error #2: 'mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given' in /home/reelloca/public_html/dir/databases/mysqli.php on line 45. Debug info: `viewers`,`threadviewers`,`hitsintemp`,`hitsouttemp`,`origtype`,`importance`,`parentids`,`timesdead`,`timesemailed`,`threadclosed`,`threadposters`,`lastposterid`,`lastpostername`,`ownername`,`deleted`,`deletionreason`,`movedto`,`deletedby`,`timevalidated`,`filefield`,`message`,`sticky`,`downloads`,`pollid`,`posticon`,`savedby`,`validatedemail`,`unpaid`,`recipverified`,`effectivetime`,`sugcatid`,`pagerank`,`wysihtml`,`movedid`,`unrevised`,`feedurl`,`feedcache`,`feedcachetime`,`tags`,`xmlsource`,`ordercomments`,`lastpadupdate`,`padfile`,`lastmonthlycheck`,`invisibleto`,`profileurl`,`lastprofileurl`,`price`,`summary`,`timesrenewed`,`timedeleted`,`address`,`city`,`state`,`country`,`latitude`,`zip`,`sponsorend`,`longitude`,`contact_name`,`contact_phone_office`,`contact_phone_home`,`contact_phone_mobile`,`contact_email`,`property_style_other`,`property_architect`,`property_size`,`property_features`,`property_credits`,`filefield_mainattach`,`contact_phone_other`,`contact_phone_other_label`,`property_style`,`mainphotoattach` FROM wsnclassifieds_links WHERE (validated=1 AND invisibleto NOT LIKE '%|3|%' AND hide=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1222049963) AND (hits < 100)) ORDER BY typeorder ASC,hits DESC LIMIT 0,42
Load time so far: 0.1 seconds. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; 100)) ORDER BY typeorder ASC,hits DESC LIMIT 0,42' at line 1
Load time so far: 0.1 seconds. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; 100)) ORDER BY typeorder ASC,hits DESC LIMIT 0,42' at line 1
Query 10: SELECT COUNT(id) FROM wsnclassifieds_links WHERE (validated=1 AND invisibleto NOT LIKE '%|3|%' AND hide=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1222049963) AND (hits < 100))
An error occoured at www.reellocations.com/dir/s...r&filled=1&whichtype=items on 2008-09-22 02:19:23. Please relay this data to support. Error #2: 'mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given' in /home/reelloca/public_html/dir/databases/mysqli.php on line 42. Debug info: dviewers`,`hitsintemp`,`hitsouttemp`,`origtype`,`importance`,`parentids`,`timesdead`,`timesemailed`,`threadclosed`,`threadposters`,`lastposterid`,`lastpostername`,`ownername`,`deleted`,`deletionreason`,`movedto`,`deletedby`,`timevalidated`,`filefield`,`message`,`sticky`,`downloads`,`pollid`,`posticon`,`savedby`,`validatedemail`,`unpaid`,`recipverified`,`effectivetime`,`sugcatid`,`pagerank`,`wysihtml`,`movedid`,`unrevised`,`feedurl`,`feedcache`,`feedcachetime`,`tags`,`xmlsource`,`ordercomments`,`lastpadupdate`,`padfile`,`lastmonthlycheck`,`invisibleto`,`profileurl`,`lastprofileurl`,`price`,`summary`,`timesrenewed`,`timedeleted`,`address`,`city`,`state`,`country`,`latitude`,`zip`,`sponsorend`,`longitude`,`contact_name`,`contact_phone_office`,`contact_phone_home`,`contact_phone_mobile`,`contact_email`,`property_style_other`,`property_architect`,`property_size`,`property_features`,`property_credits`,`filefield_mainattach`,`contact_phone_other`,`contact_phone_other_label`,`property_style`,`mainphotoattach` FROM wsnclassifieds_links WHERE (validated=1 AND invisibleto NOT LIKE '%|3|%' AND hide=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1222049963) AND (hits < 100)) ORDER BY typeorder ASC,hits DESC LIMIT 0,42
Load time so far: 0.1 seconds. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; 100)) ORDER BY typeorder ASC,hits DESC LIMIT 0,42' at line 1
Load time so far: 0.1 seconds. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; 100)) ORDER BY typeorder ASC,hits DESC LIMIT 0,42' at line 1
Query 10: SELECT COUNT(id) FROM wsnclassifieds_links WHERE (validated=1 AND invisibleto NOT LIKE '%|3|%' AND hide=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1222049963) AND (hits < 100))
I can't imagine why you wrote a form like that. Please look at the existing template, copy and paste, and base what you do on that. When you look at the template, you'll see: [edit: seems code tags are broken so I can't copy and paste the default template here accurately]
Please notice that priceconditon does not contain any numbers, and the pricesearch and pricesearchmax are separate fields where numbers can be written.
First: spaces were taken out of the html tags because your forum renders the code rather than just presenting it as written.
Secondly: I wrote the form like that because that's what my client wanted and I thought the numbers could be prebuilt into the form. Rather than having two fields where someone puts in 0 for the minimum and 1001 for the maximum I wanted a prebuilt form to search specific ranges of numbers.
My second test which is almost exactly like the one in the manual also just reloads the page. example as written
Here's a working version of the form. It seems the issue was with the commas in the numbers, my switcheroo on the condition statement and the fact that searching for "items" works on some things, but not others. I had to change whichtype to "links"
Comments on Searching custom field - no results
Forum Regular
Usergroup: Customer
Joined: Nov 26, 2003
Total Topics: 70
Total Comments: 211
Is my terminology correct here?
I used the manual to build it but the page just reloads when I choose an option. My guess is that you aren't allowed to put numbers in the value statement?
field to search is called property_size
< form action="search.php?action=filled=1&whichtype=items" method="post" >
Search for a property that is:
< select name="property_sizecondition">
< option value="< 3000">Under 3,000 sq. ft</option>
< option value="between 3000,5000">3,000 to 5,000 sq. ft.</option>
< option value="between 5000,10000">5,000 to 10,000 sq. ft.</option>
< option value="between 3000,5000">3,000 to 5,000 sq. ft.</option>
< option value="> 10000">Over 10,000 sq. ft. </option>
< /select>
< input type="hidden" name="property_sizesearch" />
< input type="submit" value="Find" class="button" />
</form>
property_size is chosen as a valid field to search in settings.
------------
Update: I'm also getting errors for searches that were originally a part of the advancedsearch.tpl.
I know that one item has over 100 visits (hits) so I plug in "find item where hits are < 100" to find the other item that hasn't been visited as often.
I get this error: (I'm getting it on quite a few of the searches listed on advancedsearch.tpl, now that I've had time to test them)
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I can't imagine why you wrote a form like that. Please look at the existing template, copy and paste, and base what you do on that. When you look at the template, you'll see: [edit: seems code tags are broken so I can't copy and paste the default template here accurately]
Please notice that priceconditon does not contain any numbers, and the pricesearch and pricesearchmax are separate fields where numbers can be written.
Forum Regular
Usergroup: Customer
Joined: Nov 26, 2003
Total Topics: 70
Total Comments: 211
First: spaces were taken out of the html tags because your forum renders the code rather than just presenting it as written.
Secondly: I wrote the form like that because that's what my client wanted and I thought the numbers could be prebuilt into the form. Rather than having two fields where someone puts in 0 for the minimum and 1001 for the maximum I wanted a prebuilt form to search specific ranges of numbers.
My second test which is almost exactly like the one in the manual also just reloads the page.
example as written
update:
-------------------
so I changed whichtype=items to whichtype=links and now the above form is working. shouldn't be 'items'?
Forum Regular
Usergroup: Customer
Joined: Nov 26, 2003
Total Topics: 70
Total Comments: 211
Here's a working version of the form. It seems the issue was with the commas in the numbers, my switcheroo on the condition statement and the fact that searching for "items" works on some things, but not others. I had to change whichtype to "links"
------------------