3 Replies Latest reply on Sep 1, 2014 4:10 PM by 2739824

    What is the significance of a ? in a query?


      I have not been a big user of SQL, where I use it the queries tend to be very basic and uncomplicated.


      I have been seeing allot of example of query strings that have ? in them, I tried searching for the answer on several site but found I was drawing a blank.




      $query = "UPDATE INTO users SET lastlogin=NOW() WHERE userid=? ";
      if( mysqli_query( $link, $query) ){
           echo "Success!";
           echo "Ooops!!! ".mysqli_error( $link );


      then the query is run via PHP.


      Is the ? something new? as it doesn't make any logical sense unless the ? is a pointer reference in some way to the last query where the field is automatically resolved and the value for that field is inserted.