Jump to content

akabugeyes

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

akabugeyes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. How about trying FIND_IN_SET? SELECT username, zip FROM usertable WHERE FIND_IN_SET (zip,'$zips');
  2. Thanks for the help wildteen and pixy. :) I have essentially gotten it working. My urls are now starting to look like this: index.php?action=filter&platform=DS,GBA&genre=RPG,Adventure which is what I wanted, in part by taking the advice given by wildteen to use post instead of get and then use a header to redirect it. I think the current way I have it coded is using a bit too much repitive coding, but I think I can work on fixing that. :) Thanks for the support!
  3. Actually the implode doesn't really have anything to do with the url being produced. The reason I use implode is so I can use it in the mysql query $filter['where'] = "FIND_IN_SET(`for`, '{$filter['platform']}') AND FIND_IN_SET(`genre`, '{$filter['genre']}')"; Basically the url: index.php?action=filter&platform=DS,GBA&genre=Adventure,RPG is something I'd like to do but I have no current code that does anything for it to work. Ignoring the characters being put in the url, the url currently looks like index.php?action=filter&platform=DS&platform=Adventure&genre=RPG&genre=Adventure So if I can't get it to separate with a comma or plus sign, it would be nice to at least get rid of those extra characters getting produced in the url.
  4. Well in Filter.php I have: [code] foreach($_GET['genre'] as $gen) { $filter['genre'][] = $gen; } $filter['genre'] = implode(',',$filter['genre']); // Same routine for platform! ;) $filter['platform'] = array(); foreach($_GET['platform'] as $plat) { $filter['platform'][] = $plat; } $filter['platform'] = implode(',',$filter['platform']);[/code] And the template code looks like this: [code] <form action="index.php" method="get"> <fieldset class="row2"> <legend>Do we have a platform to filter by?</legend> <input name="action" value="filter" type="hidden" /> <select name="platform[]"  multiple="multiple"> <option value="all" selected="selected" style="font-weight: bold;">All</option> <option value="DS">DS</option> <option value="GBA">GBA</option> </select>     </fieldset>'; echo ' <fieldset class="row2" style="margin-top: 10px;"> <legend>How about filtering by genre?</legend> <select name="genre[]" multiple="multiple"> <option value="all" selected="selected" style="font-weight: bold;">All</option> <option value="RPG">RPG</option> <option value="Adventure">Adventure</option> </select>       </fieldset> <input type="submit" value="Submit" name="submit" /> </form>';[/code] When I echo $filter['genre'] I get: RPG,Adventure and when I echo $filter['platform'] I get: DS,GBA, which they are used with FIND_IN_SET for the where part of my mysql query, but that doesn't really have to do with the link being produced.
  5. [quote author=JayBachatero link=topic=99052.msg396871#msg396871 date=1152859696] [quote author=effigy link=topic=99052.msg396016#msg396016 date=1152746157] I use the forums at work and at home, but the "Show unread posts since last visit" does not keep up with me. For instance, when I logged in from home just now I saw that certain forums had new posts (by the blue icon); however, when I clicked "Show unread posts since last visit", no posts were listed. [/quote] Weird.  It shouldn't be doing that.  Ask Thantos to take a look into it. [/quote]Notice that it is unread posts since [i]last visit[/i]. Are you sure that there were new posts since you were last logged in? Each board indicator shows their are new posts since you last visited the board, not since your last visit to the forum, so they don't reflect the same thing.
  6. Hi, I have created a filter system for a program I am creating that allows the users to select items from a multiple select box and see results with columns that contain one of the selected choices. That much I have working. It is just when I want to use method="get" so it can be linked to, the url looks really bad. With the current system the url comes out like this: [code]index.php?action=filter&platform%5B%5D=DS&platform%5B%5D=GBA&genre%5B%5D=RPG&genre%5B%5D=Adventure&submit=Submit[/code] Where the options for the platform select: 'DS' and 'GBA' have been selected and the options for the genre select: 'RPG' and 'Adventure' have been selected. What I would ideally like to do is get rid of all those %5B%5D characters in the url, I think it may have something to do with the use of making the name of selects an array (<select name="name[]"). I would also like to get rid of the submit=Submit if possible and condense the different selections into a comma separated list. So the url could look something like: index.php?action=filter&platform=DS,GBA&genre=Adventure,RPG Does anyone know what could help me accomplish this? Would this even be possible by using the method="get" or would I perhaps need to use method="post" and maybe redirect using the header() function to the proper place? Any advice would be appreciated. :)
  7. My mod is so bad it won't ever get approved. :P Okay hopefully it will. Yeah, basically the mod puts two settings in each user's profile where they can change away from the default number for how many topics they view per page on the message index and another setting for how many posts show up per page when inside a topic. There are other handy mods you guys may want to try out as well, like group moderator, ignore boards, and Jay right here is working on a global announcement mod. Hope that was okay for me to say in public, Jay. :P
  8. Great job on converting to SMF. I am the Doc Coordinator at SMF, Jay (above, and a support specialist there) alerted me that you guys converted and I have to say I am really happy that you have. ;)
  9. Barand, just so you know, SMF has a [nobbc][nobbc][/nobbc][/nobbc] that will not parse the bbcode when used. So you don't have to use ( ) to demonstrate how it is used. ;) [nobbc][b]I'm not bold![/b][/nobbc] But the link wildteen88 posted should be looked at. It is rather useful.
  10. Thank you wickning1. Indeed that method did work.
  11. Thank you, that did it. :) For some reason I also had to put DISTINCT after SELECT or it would select the same rows three times each. Like this: [code]SELECT DISTINCT a.review, a.gameID, a.userID, b.memName, b.memID FROM reviews as a, users as b INNER JOIN reviews ON a.userID = b.memID[/code]
  12. I am having a problem with a simple join statement that I want to connect two tables together with. My two tables look something like this: [i]users[/i] fields: userID, memName (and some other non relevant ones) [i]reviews[/i] fields: gameID, memID, review What I want to do is join the tables so I can match up the memberID of each one to produce the member name. So for example say the users table looked like this: userID|memName 1 | akabugeyes 2 | admin and the reviews table looked like this: memID|review|gameID 1 |blah | 1 2 |blah2 | 2 I would want them to join like this: userID|memName |memID|review|gameID [b]1[/b] |akabugeyes|[b]1[/b] |blah |1 [b]2[/b] |admin |[b]2[/b] |blah2 |2 I've tried this:[code]SELECT a.review, a.gameID, a.userID, b.memName, b.memID FROM reviews as a, users as b LEFT JOIN users  ON a.userID = b.memID[/code] but that doesn't work right. Any help would be appreciated. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.