READ ONLY MODE IS ACTIVATED
![]() |
ACDB Forums :: Anime Characters Database :: Site Discussion |
Posted 16 year(s) ago | Re: | # 2424 |
Kyareshi The Plotmeister ![]() ![]() Joined on 01-08-09 Posts 940 |
Yeah, I guess it does, but it doesn't really set apart the quote from the rest of one's post visually. That's what had me confused. See above. ![]() |
Posted 16 year(s) ago | Re: | # 2425 |
Sorari DeaD WoRld ![]() ![]() Joined on 10-14-08 Posts 297 |
I agree with you Kyareshi. You can't really tell them appart.
Don't FORGET to vote in the Poll!
![]() |
Posted 16 year(s) ago | Re: | # 2426 |
Rei ダメ人間 ![]() ![]() ![]() Joined on 05-24-07 Posts 2102 |
It's more like this theme doesn't highlight quoted text very well.
Also, our hosting company is located in the US. They have amazing connectivity in North America, and terrible connectivity everywhere else. :( The only time the server does go offline is for a short while around 12AM Central when I do a full backup. We use MySQL, and Apache + Lighttpd + OpenBSD + PHP. A typical OAMP setup with a few customizations. MySQL can do a lot of impressive things. And it can do even more impressive features with a little creativity. If you're interested in our queries, try adding debug to the GET string of some pages. I do love sharing info on technical details with people interested. |
Posted 16 year(s) ago | Re: | # 2427 |
Kyareshi The Plotmeister ![]() ![]() Joined on 01-08-09 Posts 940 |
Oh, so it's the skin. I thought something was weird with the quotations.
Well, every other time I try to post, I can't seem to get through to your site. It's not a big problem, I just thought I'd ask. I appreciate your willingness to share information. I'm afraid I haven't worked with either Lighttpd or OpenBSD. My programming experience is greatly limited to offline environments. Still, if I can be of use, I certaintly wouldn't mind helping out with some SQL related issues. Also, I would gladly be of assistance with language-related issues, i.e. Japanese names and such. As long as you don't expect me to translate endless pages of Japanese text – I do have other hobbies. ;-) ![]() |
Posted 16 year(s) ago | Re: | # 2428 |
Rei ダメ人間 ![]() ![]() ![]() Joined on 05-24-07 Posts 2102 |
I modified the forum theme CSS... quotes should now have orange text, or after a refresh they will.
We use lighttpd as our image server. I really want to replace it with SCIS (Simple Caching Image Server, a webserver i wrote for dynamically caching images and serving everything out of RAM with tons of optimizations) it's just, Lighttpd is RFC 2616 Complaint and SCIS... well is not. Although web browsers that can compensate for broken standards render the images perfectly, I'm not quite ready to set loose SCIS on everyone using the site. I have much to learn about SQL, the next problem I run into, I'll be asking you for advice. ![]() Satoru Nakamura has been translating the Japanese web site, so you don't have to worry about endless pages of Japanese text. ^_^ If you spot any wrong names though, please let me or brobb know. -EDIT- Kyareshi, here's a question on MySQL... how would you write a query for searching names in the database? http://www.animecharactersdatabase.com/newsearch.php?name=utawareru+mono&stype=2&debug SELECT cr,img1,english,japanese,furigana,id FROM publishers WHERE (english LIKE '%utawareru%' OR japanese LIKE '%utawareru%' OR furigana LIKE '%utawareru%') AND (english LIKE '%mono%' OR japanese LIKE '%mono%' OR furigana LIKE '%mono%') LIMIT 1000
What I'd like is to have a query that can adapt to spelling mistakes, and return partial matches. Sorta like, if the first 3 characters are right, and the last 5 characters are right, but the middle characters are different, it would return that as a result. [ Edited Jan 11, 2009 ] |
Posted 16 year(s) ago | Re: | # 2444 |
Kyareshi The Plotmeister ![]() ![]() Joined on 01-08-09 Posts 940 |
Well, going simply by your "first three characters" and "last five characters" criteria, I'll be a where clause such as the following will work fine. Please bear in mind that the following code is untested (also, I don't have a MySQL environment to test it in).
WHERE (english LIKE 'UTA%') AND (english LIKE '%UMONO') Obviously, you would have to include the "japanese" and "furigana" fields as well, but you get the basic idea. Compensating for users' spelling mistakes is never an easy operation, of course. The most surefire way to avoid the issue is to, when the query returns no results, remind them to double-check for spelling mistakes. But I understand your desire for a function like this. ![]() |
Posted 16 year(s) ago | Re: | # 2448 |
Rei ダメ人間 ![]() ![]() ![]() Joined on 05-24-07 Posts 2102 |
I've got that much implemented... Searching for "^uta" or "mono^" will do searches of that type. Was curious if there was a way to do it automatically, though. When I was reading how MySQL internally performs those searches... was thinking it would be nice if results that passed X number of tests would also be returned. IE) In order to find utaware, you MySQL has to find all strings matching u, all strings matching ut, all strings matching uta... etc etc. |
Posted 16 year(s) ago | Re: | # 2449 |
Kyareshi The Plotmeister ![]() ![]() Joined on 01-08-09 Posts 940 |
In the query statement you gave, there were % symbols on both ends of the test string. This simply looks for the substrings 'utawareru' and 'mono' regardless of their placement within the string (e.g. this would also find a string such as "mono utawareru"). The statement I gave would only find those strings if they are located at the beginning and end of the string respectively (i.e. mine would only find values like "uta blah blah umono"). Oh, and I don't know what your current solution is regarding character case.
As for the idea you suggested of matching every character, I wouldn't know whether there's a built-in function like this in MySQL, though I doubt it, for the simple reason that this could quickly become a slow process on a large database. I assume MySQL supports stored procedures – in that case, with some effort, one like this can be written – though I wouldn't recommend this approach myself. Have people requested this feature, or are you simply playing around with ideas? [ Edited Jan 11, 2009 ] ![]() |
Posted 16 year(s) ago | Re: | # 2454 |
Rei ダメ人間 ![]() ![]() ![]() Joined on 05-24-07 Posts 2102 |
Ah, sorry, I should have said a user searching for "^uta" uses the type of query you mentioned 'uta%' when searching.
True, it would be a slow process to search like that. Hmm, still how does Google do it? Haha. I thank you for the discussion. Was mostly playing around with ideas, but I have been concerned that some people are searching for characters we have, but not finding them because the name they searched is different from the name in the database. You pointed out a couple at the start of your thread. ^^ So, I've started by modifying how the Character Name search works. It'll now do two search, first what the user wanted, then the second search will look only for character names starting with the first 3 letters. |
Posted 16 year(s) ago | Re: | # 2455 |
Kyareshi The Plotmeister ![]() ![]() Joined on 01-08-09 Posts 940 |
I'm not sure what Google does, but bear in mind that Google is not one central server running off a local database. If memory serves it forwards searches to multiple terminals along the way. Also, in the case of a search engine, it's more sensible to keep a list of commonly searched keywords and suggest similar search terms from there – in fact, I would wager they are currently doing something like this.
Sure, I'm enjoying this discussion myself. Your suggestion of doing a second search for the first three characters sounds reasonable. You could also execute the second search only if the first returns no result to save on processing time. Something else you might try – though this is perhaps a bit shaky – is to do another search on four characters if the three character search returns too many results. You could specify a maximum number of rows and keep doing more specific searches until the returned results are less than or equal to this preset number. It could get a little processor intensive, but I bet it would still be faster than doing one search for every character. ![]() |
![]() |