Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    vsp is offline
    New to the CF scene
    Join Date
    Jan 2012
    Thanked 0 Times in 0 Posts

    Simple MySql Query needed for newbie

    Not new to programming but I am to JQuery (and j/script in general).

    I need to query a mysql database to return a small amount of data (some text) based on a user code (e.g. MrABC).

    I could use an iFrame and PHP but if the internet connection is down I do not want error messages displayed - the intended audience have limited cognitive capabilities and will not cope with ERROR 404 etc...

    Essentially I need to be able to create a function that can be called with a parameter of the usercode and which returns the text from the lookup. What I put in the function is a complete mystery to me ...

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,749 Times in 4,711 Posts
    Ummm...but then you should be asking this in the MySQL and/or PHP forums, no?

    I mean, presumably you know what the JS side of things should be doing? That is, use $.get() or $.post() with jQuery to send the request to the server?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


    Posting Permissions

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