Article written by

18 Responses

Page 1 of 1
  1. Ryan Martin
    Ryan Martin at | | Reply

    Is querytype really necessary or can I remove that part?  I am using this with MVC3 and this is exactly the setup I want is far as caching goes but I am not sure how I can set querytype in my view since MVC doesn’t have arrays like your using in PHP.

    1. Sean Sandy
      Sean Sandy at | | Reply

      Nope, it is not required. In this case I was using it to validate the query and return the correct data for that type. If you can (or have to) do it a different way in MVC3, then by all means, go ahead!

      1. Ryan Martin
        Ryan Martin at | | Reply


  2. Steve
    Steve at | | Reply

    Sean, what is sQuery ? Is that a custom mysql wrapper you use. I couldn’t find it through google.

    1. Sean Sandy
      Sean Sandy at | | Reply

      Any query builder really, I have one in ShoestringPHP:

      I have also started building one from scratch using tdd:

      1. Steve
        Steve at | | Reply

        Cool, okay just wondering. I appreciate the code sample for autocomplete. This saves mucho time.

        1. Sean Sandy
          Sean Sandy at | | Reply

          Glad it helped! I put in the generated sql as a comment below the code to help out as well, maybe it should have been on top?

          1. steve
            steve at |

            No, where you have it is fine.. most people would see it.. i think I was in need of caffeine about that time

  3. Eric
    Eric at | | Reply

    It just doesn’t work.

  4. Jay
    Jay at | | Reply

    Was cut off
    HTML id=”ajax_container_id” style=”display:none;”

  5. Jay
    Jay at | | Reply

    Thank you for the code.
    I will appreciate your comment on this one:


    [div id=”ajax_container_id” style=”display:none;”] [/div]

    JavaScript (source part)


    function(req, res){
    $('#ajax_container_id').load('?r=controller/action',{ request:req['term'], someotherdata:data },function(){

    PHP as is or any…

    There is no caching but an idea of a shorter code.

    Thank you in advance.

  6. Marek
    Marek at | | Reply


    Thanks for your tutorial. One thing you forgot is parsing json from string.


    1. Marek
      Marek at | | Reply

      Oops sorry, everythink is ofcourse OK

Leave a Reply