Webmastersite.net
Register Log In

Searching custom field - no results
page keeps reloading.

Comments on Searching custom field - no results

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Sep 21, 2008 - 5:53 PM:

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)

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))

Count is

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Sep 22, 2008 - 4:33 PM:

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.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Sep 23, 2008 - 10:48 AM:

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

<form action="search.php?action=filled=1&whichtype=items" method="post">
<input type="hidden" name="property_sizecondition" value="between"> Between <input type="text" name="property_sizesearch"> and <input type="text" name="property_sizesearchmax">
<input type="submit" value="Find" class="button" />
</form>


update:
-------------------
so I changed whichtype=items to whichtype=links and now the above form is working. shouldn't be 'items'?

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Sep 23, 2008 - 1:10 PM:

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"

------------------



<form action="search.php?action=filter&filled=1&whichtype=links" "method="post">

<input type="hidden" name="fieldcondition" value="between">
<select name="fieldsearch">
<option value="1 3000">between 0 and 3000</option>
<option value="3000 5000">between 3,000 5,000 </option>
<option value="5000 10000">between 5,000 10,000</option>
<option value="10000 10000000000">between 10,000 and some huge number to represent max </option>
</select>

<input type="submit" value="Find" class="button" />

</form>




Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.