When I leave the minimum value blank and enter a max value, I get a result fine. When I leave the maximum value blank and enter a min value, I get a result fine.
When I enter a value for both, I get this:
Load time so far: 0.08 seconds.
Query 2: SELECT `name`,`value` FROM wsnlinks_switches WHERE id>0
Number of rows is 87
Load time so far: 0.09 seconds.
Query 3: SELECT `id`,`title`,`caneditown`,`caneditall`,`canvote`,`isadmin`,`canpost`,`canemail`,`validatecats`,`validatecomments`,`validatelinks`,`validateedits`,`cansubmitlinks`,`cansubmitcategories`,`cansubmitcomments`,`caneditownlinks`,`caneditowncategories`,`caneditowncomments`,`caneditownprofile`,`caneditalllinks`,`caneditallcategories`,`caneditallcomments`,`caneditallprofiles`,`candownloadfiles`,`canupload`,`canviewip`,`limitlinks`,`canemailmembers`,`canusehtml`,`limitlinksdaily`,`canalias`,`cancopy`,`candeleteown`,`candeleteall`,`candofulledit`,`candeletecategories`,`candeletecomments`,`candeleteowncategories`,`candeleteowncomments`,`candeletemembers`,`candeleteownmembers`,`canaliascategories`,`canviewpages`,`caneditvotes`,`numaliases`,`canviewvotes`,`canhideownlinks`,`canhideowncategories`,`canhideowncomments`,`canhidealllinks`,`canhideallcategories`,`canhideallcomments`,`canratecomments`,`bytespermem`,`canpm`,`canim`,`canharddelete`,`limitpms`,`limitpmsdaily`,`canviewdeleted`,`cansubmitpolls`,`candeletepolls`,`candeleteownpolls`,`caneditpolls`,`caneditownpolls`,`attachperpost`,`attachperpm`,`canviewshouts`,`caneditshouts`,`caneditownshouts`,`candeleteshouts`,`candeleteownshouts`,`cansubmitshouts`,`canpollvote`,`customtitle`,`canviewinvisible`,`namestyle`,`canpmimportant`,`canviewmodlog`,`isleader`,`cansubmitquotes`,`validatequotes`,`candeletequotes`,`candeleteownquotes`,`canreport`,`canusesearch`,`attachperlink`,`validateattachments`,`caneditownquotes`,`caneditallquotes`,`canviewchat`,`caneditownevents`,`caneditallevents`,`candeleteownevents`,`candeleteevents`,`cansubmitevents`,`validateevents`,`bulkpms`,`issupermod`,`numinv`,`allowugspec`,`validateemails`,`validatesponsorlinks`,`cansubmittags`,`candeletetags`,`cansubmitfeeds`,`validatefeeds`,`validatefeeditems`,`numaliasestot`,`shoutsperday`,`validatetrader`,`renewdays`,`renewtimes` FROM wsnlinks_membergroups WHERE id>0
Query 5: SELECT `id`,`to`,`subject`,`message`,`headers`,`replacement`,`mime` FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10
Number of rows is 0
Query 6: UNLOCK TABLES
Query 7: INSERT INTO wsnlinks_searches(`value`,`memberid`,`catid`,`time`) VALUES('1 2','0','','1194224590')
Load time so far: 0.14 seconds.
Query 8: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`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`,`timesrenewed`,`mellboseg`,`derekboseg`,`csipoboseg`,`cipo`,`suly`,`teljesnev`,`orszag`,`megye`,`telepules`,`magassag`,`konfekcio`,`gyakorlat`,`iranyitoszam`,`hajszin`,`szemszin`,`tevekenyseg`,`oltozet`,`magamrol`,`megjelenes`,`referencia`,`nyelvtudas`,`tiltott`,`telefon`,`eletkor`,`szulinap` FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194224590) AND (eletkor '1 2')) ORDER BY hits DESC LIMIT 0,60
Load time so far: 0.14 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 ''1 2')) ORDER BY hits DESC LIMIT 0,60' at line 1
Query 9: SELECT COUNT(id) FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194224590) AND (eletkor '1 2'))
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 29 Count is
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 26
Number of rows is 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 ''1 2'))' at line 1
Load time so far: 0.2 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 ''1 2'))' at line 1
Query 10: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid>0
Count is 1
Load time so far: 0.2 seconds.
Query 11: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=0
Count is 1
Load time so far: 0.2 seconds.
Query 12: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=1
Count is 0
Load time so far: 0.2 seconds.
Query 13: SELECT COUNT(id) FROM wsnlinks_sessions WHERE time > 1194223690
Count is 2
Load time so far: 0.2 seconds.
Query 14: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE time > 1194223690 ORDER BY memberid desc,time desc LIMIT 0,300
Number of rows is 2
Load time so far: 0.3 seconds.
Query 15: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE ip='78.92.0.55' AND memberid=0
Number of rows is 1
Load time so far: 0.3 seconds.
Query 16: UPDATE wsnlinks_sessions SET starttime='1194217700', time='1194224590', location='http://www.apollomodel.net/search.php?action=filter&&whichtype=links', catid='', threadid='', areaname='Search Results', nopermission='0', inchat='0', ip='78.92.0.55' WHERE id=49
When I check off 'Divatmodell' for example, knowing that there is a link in the database that has at least that value in that field, it produces this:
Load time so far: 0.08 seconds.
Query 2: SELECT `name`,`value` FROM wsnlinks_switches WHERE id>0
Number of rows is 87
Load time so far: 0.09 seconds.
Query 3: SELECT `id`,`title`,`caneditown`,`caneditall`,`canvote`,`isadmin`,`canpost`,`canemail`,`validatecats`,`validatecomments`,`validatelinks`,`validateedits`,`cansubmitlinks`,`cansubmitcategories`,`cansubmitcomments`,`caneditownlinks`,`caneditowncategories`,`caneditowncomments`,`caneditownprofile`,`caneditalllinks`,`caneditallcategories`,`caneditallcomments`,`caneditallprofiles`,`candownloadfiles`,`canupload`,`canviewip`,`limitlinks`,`canemailmembers`,`canusehtml`,`limitlinksdaily`,`canalias`,`cancopy`,`candeleteown`,`candeleteall`,`candofulledit`,`candeletecategories`,`candeletecomments`,`candeleteowncategories`,`candeleteowncomments`,`candeletemembers`,`candeleteownmembers`,`canaliascategories`,`canviewpages`,`caneditvotes`,`numaliases`,`canviewvotes`,`canhideownlinks`,`canhideowncategories`,`canhideowncomments`,`canhidealllinks`,`canhideallcategories`,`canhideallcomments`,`canratecomments`,`bytespermem`,`canpm`,`canim`,`canharddelete`,`limitpms`,`limitpmsdaily`,`canviewdeleted`,`cansubmitpolls`,`candeletepolls`,`candeleteownpolls`,`caneditpolls`,`caneditownpolls`,`attachperpost`,`attachperpm`,`canviewshouts`,`caneditshouts`,`caneditownshouts`,`candeleteshouts`,`candeleteownshouts`,`cansubmitshouts`,`canpollvote`,`customtitle`,`canviewinvisible`,`namestyle`,`canpmimportant`,`canviewmodlog`,`isleader`,`cansubmitquotes`,`validatequotes`,`candeletequotes`,`candeleteownquotes`,`canreport`,`canusesearch`,`attachperlink`,`validateattachments`,`caneditownquotes`,`caneditallquotes`,`canviewchat`,`caneditownevents`,`caneditallevents`,`candeleteownevents`,`candeleteevents`,`cansubmitevents`,`validateevents`,`bulkpms`,`issupermod`,`numinv`,`allowugspec`,`validateemails`,`validatesponsorlinks`,`cansubmittags`,`candeletetags`,`cansubmitfeeds`,`validatefeeds`,`validatefeeditems`,`numaliasestot`,`shoutsperday`,`validatetrader`,`renewdays`,`renewtimes` FROM wsnlinks_membergroups WHERE id>0
Load time so far: 0.11 seconds.
Query 4: SELECT `id`,`name`,`links`,`comments`,`time`,`usergroup`,`password`,`ip`,`totalhits`,`totalhitsin`,`email`,`validated`,`template`,`language`,`lastattempt`,`allowemail`,`signature`,`avatarname`,`stylesheet`,`allowuseremail`,`albumid`,`failedattempts`,`totalbytes`,`funds`,`notifyoflinks`,`lastvisit`,`timezone`,`rating`,`pmfolders`,`notifyofpms`,`acceptpms`,`cookieduration`,`banned`,`location`,`homepage`,`occupation`,`bio`,`aim`,`icq`,`msn`,`yahoo`,`inactive`,`timeonline`,`totalpms`,`buddies`,`ignored`,`isonline`,`acceptims`,`adminpermissions`,`referrer`,`groupreverttime`,`grouprevertto`,`moderationpm`,`secondarygroups`,`linksperpage`,`commentsperpage`,`shouts`,`customtitle`,`shoutban`,`topicbans`,`forumbans`,`visibility`,`birthdate`,`lastsession`,`interests`,`posteditor`,`forumaccess`,`pmpopup`,`pmnotify`,`modnotes`,`guestnotes`,`salt`,`lastmodnote`,`newpms`,`imflag`,`orderalbums`,`lastguestnote`,`autosubscribe`,`notifymethod`,`showavatars`,`showsigs`,`warninglevel`,`topics`,`posts`,`chatcolor`,`traderrating`,`invitessent`,`validatedemail`,`calsub`,`macros`,`guestnotify`,`keychecktime`,`notifykeywords`,`autosubscribepost`,`blogrss`,`positivepct` FROM wsnlinks_members WHERE id='1' AND validated=1
Query 6: SELECT `id`,`to`,`subject`,`message`,`headers`,`replacement`,`mime` FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10
Number of rows is 0
Query 7: UNLOCK TABLES
Query 8: INSERT INTO wsnlinks_searches(`value`,`memberid`,`catid`,`time`) VALUES('Divatmodell','1','','1194467444')
Load time so far: 0.15 seconds.
Query 9: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`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`,`timesrenewed`,`mellboseg`,`derekboseg`,`csipoboseg`,`cipo`,`suly`,`teljesnev`,`orszag`,`megye`,`telepules`,`magassag`,`konfekcio`,`gyakorlat`,`iranyitoszam`,`hajszin`,`szemszin`,`tevekenyseg`,`oltozet`,`magamrol`,`megjelenes`,`referencia`,`nyelvtudas`,`tiltott`,`telefon`,`eletkor`,`szulinap`,`beljegy` FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194467444) AND (tevekenyseg 'Divatmodell')) ORDER BY hits DESC LIMIT 0,60
Load time so far: 0.15 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 ''Divatmodell')) ORDER BY hits DESC LIMIT 0,60' at line 1
Query 10: SELECT COUNT(id) FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194467444) AND (tevekenyseg 'Divatmodell'))
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 29 Count is
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 26
Number of rows is 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 ''Divatmodell'))' at line 1
Load time so far: 0.2 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 ''Divatmodell'))' at line 1
Query 11: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid>0 Count is 1
Load time so far: 0.2 seconds.
Query 12: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=0 Count is 3
Load time so far: 0.2 seconds.
Query 13: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=1 Count is 2
Load time so far: 0.2 seconds.
Query 14: SELECT COUNT(id) FROM wsnlinks_sessions WHERE time > 1194466544 Count is 1
Load time so far: 0.2 seconds.
Query 15: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE time > 1194466544 ORDER BY memberid desc,time desc LIMIT 0,300
Number of rows is 1
Load time so far: 0.3 seconds.
Query 16: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE memberid=1
Number of rows is 1
Load time so far: 0.3 seconds.
Query 17: UPDATE wsnlinks_sessions SET starttime='1194461469', time='1194467444', location='http://www.apollomodel.net/search.php?action=filter&&whichtype=links', catid='', threadid='', areaname='Search Results', nopermission='0', inchat='0', ip='78.92.3.27' WHERE id=70
Since the database field is a text, and I had many values in it, they are divided with that , thingy. Is this causing the problem? How do you search a database field that had it's values set from a checbox form input?
You can't do a search without telling it what sort of comparison you're trying to do -- it doesn't know if you want =, >, <, any of, etc since you haven't specified for any of those checkboxes.
I see, these checkboxes are all the same field... thought they were different fields. I don't recall any support for multiple value checkbox searhes. Was there a reference somewhere you were following? If it were supported it could only be done as an array, so they'd have to be tevekenysegconditon[] rather than tevekenysegconditon.
Hmmm.... I think I did this type of search already a year ago in your script. I can't find that search template anymore though.
This is what I don't understand. If I have a text field, that has values like , Divatmodell, Sminkmodell, Hajmodell, Fotómodell and I want to search this field, then why doesn't simply giving the search of that field a condition of 'like' works? Shouldn't that technically just look for words that match the selected checkbox values?
It seems strange to me that you can do such things when editing this field in the LINK EDIT. Your script DOES match words (values) from that field, otherwise it wouldn't know which values have to be checked already. So the same concept should work in a search, shouldn't it?
What about if I change this to a multiselect dropdown, and what about if I put , in front of the individual values?
I am surprised that it is possible to enter values into a field from checkboxes, then easily view and edit those values, but not search them. Paul, what can be done here?
If I have a text field, that has values like , Divatmodell, Sminkmodell, Hajmodell, Fotómodell and I want to search this field, then why doesn't simply giving the search of that field a condition of 'like' works?
It does work. What your checkboxes are doing is just sending the value of one of your checks, since a variable can only hold one value unless it's an array. So if I guess browser behavior correctly, checking all the boxes should only turn up results for Fotómodell using the HTML you're using. Did a quick test and confirmed that this is indeed working.
In order to handle mutliple values you need an array, but you also need a ton of backend code which converts the array into a complex sequence of "or" conditionals which determine the various possible field values you could be searcing for -- since if you check Divatmodell and Hajmodell for example, you don't want to match just , Divatmodell, Hajmodell, you also want to match , Divatmodell, Sminkmodell, Hajmodell.
I have a lot of higher priorities than a complex project like this which would endanger the stability of the 4.1 series, so I'll only take it on as a custom project in the near term.
Query 2: SELECT `name`,`value` FROM wsnlinks_switches WHERE id>0
Number of rows is 87
Load time so far: 0.09 seconds.
Query 3: SELECT `id`,`title`,`caneditown`,`caneditall`,`canvote`,`isadmin`,`canpost`,`canemail`,`validatecats`,`validatecomments`,`validatelinks`,`validateedits`,`cansubmitlinks`,`cansubmitcategories`,`cansubmitcomments`,`caneditownlinks`,`caneditowncategories`,`caneditowncomments`,`caneditownprofile`,`caneditalllinks`,`caneditallcategories`,`caneditallcomments`,`caneditallprofiles`,`candownloadfiles`,`canupload`,`canviewip`,`limitlinks`,`canemailmembers`,`canusehtml`,`limitlinksdaily`,`canalias`,`cancopy`,`candeleteown`,`candeleteall`,`candofulledit`,`candeletecategories`,`candeletecomments`,`candeleteowncategories`,`candeleteowncomments`,`candeletemembers`,`candeleteownmembers`,`canaliascategories`,`canviewpages`,`caneditvotes`,`numaliases`,`canviewvotes`,`canhideownlinks`,`canhideowncategories`,`canhideowncomments`,`canhidealllinks`,`canhideallcategories`,`canhideallcomments`,`canratecomments`,`bytespermem`,`canpm`,`canim`,`canharddelete`,`limitpms`,`limitpmsdaily`,`canviewdeleted`,`cansubmitpolls`,`candeletepolls`,`candeleteownpolls`,`caneditpolls`,`caneditownpolls`,`attachperpost`,`attachperpm`,`canviewshouts`,`caneditshouts`,`caneditownshouts`,`candeleteshouts`,`candeleteownshouts`,`cansubmitshouts`,`canpollvote`,`customtitle`,`canviewinvisible`,`namestyle`,`canpmimportant`,`canviewmodlog`,`isleader`,`cansubmitquotes`,`validatequotes`,`candeletequotes`,`candeleteownquotes`,`canreport`,`canusesearch`,`attachperlink`,`validateattachments`,`caneditownquotes`,`caneditallquotes`,`canviewchat`,`caneditownevents`,`caneditallevents`,`candeleteownevents`,`candeleteevents`,`cansubmitevents`,`validateevents`,`bulkpms`,`issupermod`,`numinv`,`allowugspec`,`validateemails`,`validatesponsorlinks`,`cansubmittags`,`candeletetags`,`cansubmitfeeds`,`validatefeeds`,`validatefeeditems`,`numaliasestot`,`shoutsperday`,`validatetrader`,`renewdays`,`renewtimes` FROM wsnlinks_membergroups WHERE id>0
Load time so far: 0.11 seconds.
Query 4: SELECT `id`,`name`,`links`,`comments`,`time`,`usergroup`,`password`,`ip`,`totalhits`,`totalhitsin`,`email`,`validated`,`template`,`language`,`lastattempt`,`allowemail`,`signature`,`avatarname`,`stylesheet`,`allowuseremail`,`albumid`,`failedattempts`,`totalbytes`,`funds`,`notifyoflinks`,`lastvisit`,`timezone`,`rating`,`pmfolders`,`notifyofpms`,`acceptpms`,`cookieduration`,`banned`,`location`,`homepage`,`occupation`,`bio`,`aim`,`icq`,`msn`,`yahoo`,`inactive`,`timeonline`,`totalpms`,`buddies`,`ignored`,`isonline`,`acceptims`,`adminpermissions`,`referrer`,`groupreverttime`,`grouprevertto`,`moderationpm`,`secondarygroups`,`linksperpage`,`commentsperpage`,`shouts`,`customtitle`,`shoutban`,`topicbans`,`forumbans`,`visibility`,`birthdate`,`lastsession`,`interests`,`posteditor`,`forumaccess`,`pmpopup`,`pmnotify`,`modnotes`,`guestnotes`,`salt`,`lastmodnote`,`newpms`,`imflag`,`orderalbums`,`lastguestnote`,`autosubscribe`,`notifymethod`,`showavatars`,`showsigs`,`warninglevel`,`topics`,`posts`,`chatcolor`,`traderrating`,`invitessent`,`validatedemail`,`calsub`,`macros`,`guestnotify`,`keychecktime`,`notifykeywords`,`autosubscribepost`,`blogrss`,`positivepct` FROM wsnlinks_members WHERE id='1' AND validated=1
Query 6: SELECT `id`,`to`,`subject`,`message`,`headers`,`replacement`,`mime` FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10
Number of rows is 0
Query 7: UNLOCK TABLES
Query 8: INSERT INTO wsnlinks_searches(`value`,`memberid`,`catid`,`time`) VALUES('Divatmodell','1','','1194717463')
Load time so far: 0.15 seconds.
Query 9: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`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`,`timesrenewed`,`mellboseg`,`derekboseg`,`csipoboseg`,`cipo`,`suly`,`teljesnev`,`orszag`,`megye`,`telepules`,`magassag`,`konfekcio`,`gyakorlat`,`iranyitoszam`,`hajszin`,`szemszin`,`tevekenyseg`,`oltozet`,`magamrol`,`megjelenes`,`referencia`,`nyelvtudas`,`tiltott`,`telefon`,`eletkor`,`szulinap`,`beljegy`,`timedeleted` FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194717463) AND (tevekenyseg 'Divatmodell')) ORDER BY hits DESC LIMIT 0,60
Load time so far: 0.15 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 ''Divatmodell')) ORDER BY hits DESC LIMIT 0,60' at line 1
Query 10: SELECT COUNT(id) FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194717463) AND (tevekenyseg 'Divatmodell'))
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 29 Count is
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 26
Number of rows is 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 ''Divatmodell'))' at line 1
Load time so far: 0.2 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 ''Divatmodell'))' at line 1
I selected Divatmodell only from the checkboxes, and I have a link that has Divatmodell in its 'tevekenyseg' field value.
Is there a way that you can test this yourself? A simple text link field, say 3 different checbox values to it, then try a search in that field?
, and checking one of the boxes brings up a resulting link for which I checked all the boxes. Of course it's not going to search multiple values as explained above, just ignores other selections.
My apologies Paul, I didn't see the edit on the post.
I see your point. Darn, I thought this was something simple. Oh well, no worries man, I'll just create a new individual field for each of the values I originally had.
Thanks Paul, sorry to have bothered you with this.
David
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.
Comments on Between search type error
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hi Paul,
I have a BETWEEN type search in my advanced search page. Looks like this:
When I leave the minimum value blank and enter a max value, I get a result fine.
When I leave the maximum value blank and enter a min value, I get a result fine.
When I enter a value for both, I get this:
Load time so far: 0.08 seconds.
Query 2: SELECT `name`,`value` FROM wsnlinks_switches WHERE id>0
Number of rows is 87
Load time so far: 0.09 seconds.
Query 3: SELECT `id`,`title`,`caneditown`,`caneditall`,`canvote`,`isadmin`,`canpost`,`canemail`,`validatecats`,`validatecomments`,`validatelinks`,`validateedits`,`cansubmitlinks`,`cansubmitcategories`,`cansubmitcomments`,`caneditownlinks`,`caneditowncategories`,`caneditowncomments`,`caneditownprofile`,`caneditalllinks`,`caneditallcategories`,`caneditallcomments`,`caneditallprofiles`,`candownloadfiles`,`canupload`,`canviewip`,`limitlinks`,`canemailmembers`,`canusehtml`,`limitlinksdaily`,`canalias`,`cancopy`,`candeleteown`,`candeleteall`,`candofulledit`,`candeletecategories`,`candeletecomments`,`candeleteowncategories`,`candeleteowncomments`,`candeletemembers`,`candeleteownmembers`,`canaliascategories`,`canviewpages`,`caneditvotes`,`numaliases`,`canviewvotes`,`canhideownlinks`,`canhideowncategories`,`canhideowncomments`,`canhidealllinks`,`canhideallcategories`,`canhideallcomments`,`canratecomments`,`bytespermem`,`canpm`,`canim`,`canharddelete`,`limitpms`,`limitpmsdaily`,`canviewdeleted`,`cansubmitpolls`,`candeletepolls`,`candeleteownpolls`,`caneditpolls`,`caneditownpolls`,`attachperpost`,`attachperpm`,`canviewshouts`,`caneditshouts`,`caneditownshouts`,`candeleteshouts`,`candeleteownshouts`,`cansubmitshouts`,`canpollvote`,`customtitle`,`canviewinvisible`,`namestyle`,`canpmimportant`,`canviewmodlog`,`isleader`,`cansubmitquotes`,`validatequotes`,`candeletequotes`,`candeleteownquotes`,`canreport`,`canusesearch`,`attachperlink`,`validateattachments`,`caneditownquotes`,`caneditallquotes`,`canviewchat`,`caneditownevents`,`caneditallevents`,`candeleteownevents`,`candeleteevents`,`cansubmitevents`,`validateevents`,`bulkpms`,`issupermod`,`numinv`,`allowugspec`,`validateemails`,`validatesponsorlinks`,`cansubmittags`,`candeletetags`,`cansubmitfeeds`,`validatefeeds`,`validatefeeditems`,`numaliasestot`,`shoutsperday`,`validatetrader`,`renewdays`,`renewtimes` FROM wsnlinks_membergroups WHERE id>0
Query 4: LOCK TABLES wsnlinks_email WRITE, wsnlinks_links WRITE, wsnlinks_categories WRITE, wsnlinks_members WRITE
Load time so far: 0.12 seconds.
Query 5: SELECT `id`,`to`,`subject`,`message`,`headers`,`replacement`,`mime` FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10
Number of rows is 0
Query 6: UNLOCK TABLES
Query 7: INSERT INTO wsnlinks_searches(`value`,`memberid`,`catid`,`time`) VALUES('1 2','0','','1194224590')
Load time so far: 0.14 seconds.
Query 8: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`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`,`timesrenewed`,`mellboseg`,`derekboseg`,`csipoboseg`,`cipo`,`suly`,`teljesnev`,`orszag`,`megye`,`telepules`,`magassag`,`konfekcio`,`gyakorlat`,`iranyitoszam`,`hajszin`,`szemszin`,`tevekenyseg`,`oltozet`,`magamrol`,`megjelenes`,`referencia`,`nyelvtudas`,`tiltott`,`telefon`,`eletkor`,`szulinap` FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194224590) AND (eletkor '1 2')) ORDER BY hits DESC LIMIT 0,60
Load time so far: 0.14 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 ''1 2')) ORDER BY hits DESC LIMIT 0,60' at line 1
Query 9: SELECT COUNT(id) FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194224590) AND (eletkor '1 2'))
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 29
Count is
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 26
Number of rows is 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 ''1 2'))' at line 1
Load time so far: 0.2 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 ''1 2'))' at line 1
Query 10: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid>0
Count is 1
Load time so far: 0.2 seconds.
Query 11: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=0
Count is 1
Load time so far: 0.2 seconds.
Query 12: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=1
Count is 0
Load time so far: 0.2 seconds.
Query 13: SELECT COUNT(id) FROM wsnlinks_sessions WHERE time > 1194223690
Count is 2
Load time so far: 0.2 seconds.
Query 14: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE time > 1194223690 ORDER BY memberid desc,time desc LIMIT 0,300
Number of rows is 2
Load time so far: 0.3 seconds.
Query 15: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE ip='78.92.0.55' AND memberid=0
Number of rows is 1
Load time so far: 0.3 seconds.
Query 16: UPDATE wsnlinks_sessions SET starttime='1194217700', time='1194224590', location='http://www.apollomodel.net/search.php?action=filter&&whichtype=links', catid='', threadid='', areaname='Search Results', nopermission='0', inchat='0', ip='78.92.0.55' WHERE id=49
Any thoughts?
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Changed the rating field like that: http://www.webmastersite.net/screenshots/4509.jpg
Result: http://www.webmastersite.net/screenshots/22624.jpg
HTML:
Are you sure you're dealing with a numeric field?
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hi Paul,
Interesting. The between is working fine now, even though I didn't touch anything. Weird.
NEW problem. This is the same search form:
When I check off 'Divatmodell' for example, knowing that there is a link in the database that has at least that value in that field, it produces this:
Load time so far: 0.08 seconds.
Query 2: SELECT `name`,`value` FROM wsnlinks_switches WHERE id>0
Number of rows is 87
Load time so far: 0.09 seconds.
Query 3: SELECT `id`,`title`,`caneditown`,`caneditall`,`canvote`,`isadmin`,`canpost`,`canemail`,`validatecats`,`validatecomments`,`validatelinks`,`validateedits`,`cansubmitlinks`,`cansubmitcategories`,`cansubmitcomments`,`caneditownlinks`,`caneditowncategories`,`caneditowncomments`,`caneditownprofile`,`caneditalllinks`,`caneditallcategories`,`caneditallcomments`,`caneditallprofiles`,`candownloadfiles`,`canupload`,`canviewip`,`limitlinks`,`canemailmembers`,`canusehtml`,`limitlinksdaily`,`canalias`,`cancopy`,`candeleteown`,`candeleteall`,`candofulledit`,`candeletecategories`,`candeletecomments`,`candeleteowncategories`,`candeleteowncomments`,`candeletemembers`,`candeleteownmembers`,`canaliascategories`,`canviewpages`,`caneditvotes`,`numaliases`,`canviewvotes`,`canhideownlinks`,`canhideowncategories`,`canhideowncomments`,`canhidealllinks`,`canhideallcategories`,`canhideallcomments`,`canratecomments`,`bytespermem`,`canpm`,`canim`,`canharddelete`,`limitpms`,`limitpmsdaily`,`canviewdeleted`,`cansubmitpolls`,`candeletepolls`,`candeleteownpolls`,`caneditpolls`,`caneditownpolls`,`attachperpost`,`attachperpm`,`canviewshouts`,`caneditshouts`,`caneditownshouts`,`candeleteshouts`,`candeleteownshouts`,`cansubmitshouts`,`canpollvote`,`customtitle`,`canviewinvisible`,`namestyle`,`canpmimportant`,`canviewmodlog`,`isleader`,`cansubmitquotes`,`validatequotes`,`candeletequotes`,`candeleteownquotes`,`canreport`,`canusesearch`,`attachperlink`,`validateattachments`,`caneditownquotes`,`caneditallquotes`,`canviewchat`,`caneditownevents`,`caneditallevents`,`candeleteownevents`,`candeleteevents`,`cansubmitevents`,`validateevents`,`bulkpms`,`issupermod`,`numinv`,`allowugspec`,`validateemails`,`validatesponsorlinks`,`cansubmittags`,`candeletetags`,`cansubmitfeeds`,`validatefeeds`,`validatefeeditems`,`numaliasestot`,`shoutsperday`,`validatetrader`,`renewdays`,`renewtimes` FROM wsnlinks_membergroups WHERE id>0
Load time so far: 0.11 seconds.
Query 4: SELECT `id`,`name`,`links`,`comments`,`time`,`usergroup`,`password`,`ip`,`totalhits`,`totalhitsin`,`email`,`validated`,`template`,`language`,`lastattempt`,`allowemail`,`signature`,`avatarname`,`stylesheet`,`allowuseremail`,`albumid`,`failedattempts`,`totalbytes`,`funds`,`notifyoflinks`,`lastvisit`,`timezone`,`rating`,`pmfolders`,`notifyofpms`,`acceptpms`,`cookieduration`,`banned`,`location`,`homepage`,`occupation`,`bio`,`aim`,`icq`,`msn`,`yahoo`,`inactive`,`timeonline`,`totalpms`,`buddies`,`ignored`,`isonline`,`acceptims`,`adminpermissions`,`referrer`,`groupreverttime`,`grouprevertto`,`moderationpm`,`secondarygroups`,`linksperpage`,`commentsperpage`,`shouts`,`customtitle`,`shoutban`,`topicbans`,`forumbans`,`visibility`,`birthdate`,`lastsession`,`interests`,`posteditor`,`forumaccess`,`pmpopup`,`pmnotify`,`modnotes`,`guestnotes`,`salt`,`lastmodnote`,`newpms`,`imflag`,`orderalbums`,`lastguestnote`,`autosubscribe`,`notifymethod`,`showavatars`,`showsigs`,`warninglevel`,`topics`,`posts`,`chatcolor`,`traderrating`,`invitessent`,`validatedemail`,`calsub`,`macros`,`guestnotify`,`keychecktime`,`notifykeywords`,`autosubscribepost`,`blogrss`,`positivepct` FROM wsnlinks_members WHERE id='1' AND validated=1
Query 5: LOCK TABLES wsnlinks_email WRITE, wsnlinks_links WRITE, wsnlinks_categories WRITE, wsnlinks_members WRITE
Load time so far: 0.12 seconds.
Query 6: SELECT `id`,`to`,`subject`,`message`,`headers`,`replacement`,`mime` FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10
Number of rows is 0
Query 7: UNLOCK TABLES
Query 8: INSERT INTO wsnlinks_searches(`value`,`memberid`,`catid`,`time`) VALUES('Divatmodell','1','','1194467444')
Load time so far: 0.15 seconds.
Query 9: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`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`,`timesrenewed`,`mellboseg`,`derekboseg`,`csipoboseg`,`cipo`,`suly`,`teljesnev`,`orszag`,`megye`,`telepules`,`magassag`,`konfekcio`,`gyakorlat`,`iranyitoszam`,`hajszin`,`szemszin`,`tevekenyseg`,`oltozet`,`magamrol`,`megjelenes`,`referencia`,`nyelvtudas`,`tiltott`,`telefon`,`eletkor`,`szulinap`,`beljegy` FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194467444) AND (tevekenyseg 'Divatmodell')) ORDER BY hits DESC LIMIT 0,60
Load time so far: 0.15 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 ''Divatmodell')) ORDER BY hits DESC LIMIT 0,60' at line 1
Query 10: SELECT COUNT(id) FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194467444) AND (tevekenyseg 'Divatmodell'))
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 29
Count is
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 26
Number of rows is 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 ''Divatmodell'))' at line 1
Load time so far: 0.2 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 ''Divatmodell'))' at line 1
Query 11: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid>0
Count is 1
Load time so far: 0.2 seconds.
Query 12: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=0
Count is 3
Load time so far: 0.2 seconds.
Query 13: SELECT COUNT(id) FROM wsnlinks_sessions WHERE memberid=0 AND isrobot=1
Count is 2
Load time so far: 0.2 seconds.
Query 14: SELECT COUNT(id) FROM wsnlinks_sessions WHERE time > 1194466544
Count is 1
Load time so far: 0.2 seconds.
Query 15: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE time > 1194466544 ORDER BY memberid desc,time desc LIMIT 0,300
Number of rows is 1
Load time so far: 0.3 seconds.
Query 16: SELECT `id`,`memberid`,`location`,`time`,`ip`,`browser`,`starttime`,`catid`,`threadid`,`areaname`,`lastsearch`,`nopermission`,`inchat`,`name`,`isrobot`,`lastchat`,`groupnamestyle`,`acceptims`,`visibility`,`profileurl` FROM wsnlinks_sessions WHERE memberid=1
Number of rows is 1
Load time so far: 0.3 seconds.
Query 17: UPDATE wsnlinks_sessions SET starttime='1194461469', time='1194467444', location='http://www.apollomodel.net/search.php?action=filter&&whichtype=links', catid='', threadid='', areaname='Search Results', nopermission='0', inchat='0', ip='78.92.3.27' WHERE id=70
Since the database field is a text, and I had many values in it, they are divided with that , thingy. Is this causing the problem? How do you search a database field that had it's values set from a checbox form input?
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You can't do a search without telling it what sort of comparison you're trying to do -- it doesn't know if you want =, >, <, any of, etc since you haven't specified for any of those checkboxes.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
???
I had that in there. What do you mean: "haven't specified for any of those checkboxes."
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I see, these checkboxes are all the same field... thought they were different fields. I don't recall any support for multiple value checkbox searhes. Was there a reference somewhere you were following? If it were supported it could only be done as an array, so they'd have to be tevekenysegconditon[] rather than tevekenysegconditon.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hmmm.... I think I did this type of search already a year ago in your script. I can't find that search template anymore though.
This is what I don't understand. If I have a text field, that has values like , Divatmodell, Sminkmodell, Hajmodell, Fotómodell and I want to search this field, then why doesn't simply giving the search of that field a condition of 'like' works? Shouldn't that technically just look for words that match the selected checkbox values?
It seems strange to me that you can do such things when editing this field in the LINK EDIT. Your script DOES match words (values) from that field, otherwise it wouldn't know which values have to be checked already. So the same concept should work in a search, shouldn't it?
What about if I change this to a multiselect dropdown, and what about if I put , in front of the individual values?
I am surprised that it is possible to enter values into a field from checkboxes, then easily view and edit those values, but not search them. Paul, what can be done here?
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If I have a text field, that has values like , Divatmodell, Sminkmodell, Hajmodell, Fotómodell and I want to search this field, then why doesn't simply giving the search of that field a condition of 'like' works?
It does work. What your checkboxes are doing is just sending the value of one of your checks, since a variable can only hold one value unless it's an array. So if I guess browser behavior correctly, checking all the boxes should only turn up results for Fotómodell using the HTML you're using. Did a quick test and confirmed that this is indeed working.
In order to handle mutliple values you need an array, but you also need a ton of backend code which converts the array into a complex sequence of "or" conditionals which determine the various possible field values you could be searcing for -- since if you check Divatmodell and Hajmodell for example, you don't want to match just , Divatmodell, Hajmodell, you also want to match , Divatmodell, Sminkmodell, Hajmodell.
I have a lot of higher priorities than a complex project like this which would endanger the stability of the 4.1 series, so I'll only take it on as a custom project in the near term.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Neg. It throws this back still:
Load time so far: 0.08 seconds.
Query 2: SELECT `name`,`value` FROM wsnlinks_switches WHERE id>0
Number of rows is 87
Load time so far: 0.09 seconds.
Query 3: SELECT `id`,`title`,`caneditown`,`caneditall`,`canvote`,`isadmin`,`canpost`,`canemail`,`validatecats`,`validatecomments`,`validatelinks`,`validateedits`,`cansubmitlinks`,`cansubmitcategories`,`cansubmitcomments`,`caneditownlinks`,`caneditowncategories`,`caneditowncomments`,`caneditownprofile`,`caneditalllinks`,`caneditallcategories`,`caneditallcomments`,`caneditallprofiles`,`candownloadfiles`,`canupload`,`canviewip`,`limitlinks`,`canemailmembers`,`canusehtml`,`limitlinksdaily`,`canalias`,`cancopy`,`candeleteown`,`candeleteall`,`candofulledit`,`candeletecategories`,`candeletecomments`,`candeleteowncategories`,`candeleteowncomments`,`candeletemembers`,`candeleteownmembers`,`canaliascategories`,`canviewpages`,`caneditvotes`,`numaliases`,`canviewvotes`,`canhideownlinks`,`canhideowncategories`,`canhideowncomments`,`canhidealllinks`,`canhideallcategories`,`canhideallcomments`,`canratecomments`,`bytespermem`,`canpm`,`canim`,`canharddelete`,`limitpms`,`limitpmsdaily`,`canviewdeleted`,`cansubmitpolls`,`candeletepolls`,`candeleteownpolls`,`caneditpolls`,`caneditownpolls`,`attachperpost`,`attachperpm`,`canviewshouts`,`caneditshouts`,`caneditownshouts`,`candeleteshouts`,`candeleteownshouts`,`cansubmitshouts`,`canpollvote`,`customtitle`,`canviewinvisible`,`namestyle`,`canpmimportant`,`canviewmodlog`,`isleader`,`cansubmitquotes`,`validatequotes`,`candeletequotes`,`candeleteownquotes`,`canreport`,`canusesearch`,`attachperlink`,`validateattachments`,`caneditownquotes`,`caneditallquotes`,`canviewchat`,`caneditownevents`,`caneditallevents`,`candeleteownevents`,`candeleteevents`,`cansubmitevents`,`validateevents`,`bulkpms`,`issupermod`,`numinv`,`allowugspec`,`validateemails`,`validatesponsorlinks`,`cansubmittags`,`candeletetags`,`cansubmitfeeds`,`validatefeeds`,`validatefeeditems`,`numaliasestot`,`shoutsperday`,`validatetrader`,`renewdays`,`renewtimes` FROM wsnlinks_membergroups WHERE id>0
Load time so far: 0.11 seconds.
Query 4: SELECT `id`,`name`,`links`,`comments`,`time`,`usergroup`,`password`,`ip`,`totalhits`,`totalhitsin`,`email`,`validated`,`template`,`language`,`lastattempt`,`allowemail`,`signature`,`avatarname`,`stylesheet`,`allowuseremail`,`albumid`,`failedattempts`,`totalbytes`,`funds`,`notifyoflinks`,`lastvisit`,`timezone`,`rating`,`pmfolders`,`notifyofpms`,`acceptpms`,`cookieduration`,`banned`,`location`,`homepage`,`occupation`,`bio`,`aim`,`icq`,`msn`,`yahoo`,`inactive`,`timeonline`,`totalpms`,`buddies`,`ignored`,`isonline`,`acceptims`,`adminpermissions`,`referrer`,`groupreverttime`,`grouprevertto`,`moderationpm`,`secondarygroups`,`linksperpage`,`commentsperpage`,`shouts`,`customtitle`,`shoutban`,`topicbans`,`forumbans`,`visibility`,`birthdate`,`lastsession`,`interests`,`posteditor`,`forumaccess`,`pmpopup`,`pmnotify`,`modnotes`,`guestnotes`,`salt`,`lastmodnote`,`newpms`,`imflag`,`orderalbums`,`lastguestnote`,`autosubscribe`,`notifymethod`,`showavatars`,`showsigs`,`warninglevel`,`topics`,`posts`,`chatcolor`,`traderrating`,`invitessent`,`validatedemail`,`calsub`,`macros`,`guestnotify`,`keychecktime`,`notifykeywords`,`autosubscribepost`,`blogrss`,`positivepct` FROM wsnlinks_members WHERE id='1' AND validated=1
Query 5: LOCK TABLES wsnlinks_email WRITE, wsnlinks_links WRITE, wsnlinks_categories WRITE, wsnlinks_members WRITE
Load time so far: 0.12 seconds.
Query 6: SELECT `id`,`to`,`subject`,`message`,`headers`,`replacement`,`mime` FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10
Number of rows is 0
Query 7: UNLOCK TABLES
Query 8: INSERT INTO wsnlinks_searches(`value`,`memberid`,`catid`,`time`) VALUES('Divatmodell','1','','1194717463')
Load time so far: 0.15 seconds.
Query 9: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`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`,`timesrenewed`,`mellboseg`,`derekboseg`,`csipoboseg`,`cipo`,`suly`,`teljesnev`,`orszag`,`megye`,`telepules`,`magassag`,`konfekcio`,`gyakorlat`,`iranyitoszam`,`hajszin`,`szemszin`,`tevekenyseg`,`oltozet`,`magamrol`,`megjelenes`,`referencia`,`nyelvtudas`,`tiltott`,`telefon`,`eletkor`,`szulinap`,`beljegy`,`timedeleted` FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194717463) AND (tevekenyseg 'Divatmodell')) ORDER BY hits DESC LIMIT 0,60
Load time so far: 0.15 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 ''Divatmodell')) ORDER BY hits DESC LIMIT 0,60' at line 1
Query 10: SELECT COUNT(id) FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((effectivetime < 1194717463) AND (tevekenyseg 'Divatmodell'))
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 29
Count is
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/apollo/public_html/databases/mysql.php on line 26
Number of rows is 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 ''Divatmodell'))' at line 1
Load time so far: 0.2 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 ''Divatmodell'))' at line 1
I selected Divatmodell only from the checkboxes, and I have a link that has Divatmodell in its 'tevekenyseg' field value.
Is there a way that you can test this yourself? A simple text link field, say 3 different checbox values to it, then try a search in that field?
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
My advanced search template contains
, and checking one of the boxes brings up a resulting link for which I checked all the boxes. Of course it's not going to search multiple values as explained above, just ignores other selections.
Did you see my above post after the 9:54 edit?
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
My apologies Paul, I didn't see the edit on the post.
I see your point. Darn, I thought this was something simple.
Oh well, no worries man, I'll just create a new individual field for each of the values I originally had.
Thanks Paul, sorry to have bothered you with this.
David