Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    New Coder
    Join Date
    Aug 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    decided to keep it simple

    I decided to forego the complexity; it was not needed either. I just have two search options: the keyword and the dropdown. and will go with that for now. I am only allowing users to choose one option in the dropdown for now. So for now...

    Thank you Arctic...

  2. #17
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    build the first dropdown with say a list of activities say dribbling, handling etc
    then on change use ajax to build the next one via a seperate php page with like number of players based on the search from the first box etc
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  3. #18
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    you could put them both in the search term
    PHP Code:
    if(stristr($search',') === FALSE) {
    $search mysql_real_escape_string(trim($_POST['searchterms']))." ".mysql_real_escape_string(trim($_POST['categorysearch']));
    }else{
    $search mysql_real_escape_string(trim($_POST['searchterms'])).",".mysql_real_escape_string(trim($_POST['categorysearch']));
    }
    $search mysql_real_escape_string(trim($_POST['searchterms']));
    if(
    stristr($search',') === FALSE) {
    if(
    stristr($search' ') === FALSE) {
    $keywords[1] = $search;
    }else{
    $keywords explode(' ',$search);
    }
    }else{
    $keywords explode(',',$search);
    }
    $searchterm '';
    foreach (
    $keywords as $keyword){
    $searchterm .= " OR `KEYWORDS` LIKE '%$keyword%' ";

    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  4. #19
    New Coder
    Join Date
    Aug 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Another question

    I discovered an issue. I put in the keyword "post defense", I get more results than I want. I get all the results that have post in the keyword and all the results that have defense in the keywords. How do I make it so that the words "post defense" can be taken as an integral keyword itself.

  5. #20
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    is that the only keyword that has a space in it?
    near the top put
    PHP Code:
    if(stristri($search'post defense') === TRUE) {
        
    $keywords[99] = 'post defense';

    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  6. #21
    New Coder
    Join Date
    Aug 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    multiple examples

    no, there are several possibilities. some examples are below..

    help defense
    post defense
    transition
    jump shots
    jump stop
    post screen
    screen defense

    there are more examples but essentially the point is that if I put in the keyword or key phrase post defense, I don't want all the drills that have the keyword post and the keyword defense. If someone puts in screen defense, i don't want all screens and all defense... I would get more results than intended. I don't really want to make them one word. I am giving the users a list of potential keywords but the goal at some point will be to expand the possibilities to make it more granular.

  7. #22
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    you might be better with a table filter:

    http://tablefilter.free.fr/ajax-demo-editable-grid.htm
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  8. #23
    New Coder
    Join Date
    Aug 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not sure I understand. This seems to be a demo of an editable HTML table.

  9. #24
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    yes, the table can be populated by php & mysql

    with search text boxes or dropdowns at the top of each column.

    i'll try and through together a demo later, im at work at the moment
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  10. #25
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    do you have a dropbox account?

    i'll share a folder on mine with you
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  11. #26
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    take a look at this:

    http://mr-smiths.co.uk/freedom123/


    can you export your database table for drills and email it to me?
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  12. #27
    New Coder
    Join Date
    Aug 2013
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    that might be beyond the need or not what I am referring to. I have the sql that I have exported from the database. I sent an email via the forum. Will include my email.

    My structure may not be optimum. I have an image path with folder/filename to call from my php. I just added a variable that will contain the image folder but have not implemented it yet. It hit me that it would be easier to change in one location rather than every database entry if that folder ever changes...so will likely have retrofit and link two variables together.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •