WHERE 'command?'

Help
2006-08-22
2013-04-02
  • Result := mysql.query('SELECT * FROM c WHERE(User=  ***Lets say i want to insert a variable here, how would i do that.***)', True, executed);
    showmessage(Result.FieldValue(1));

    want to know how to use the WHERE= parameter with a variable in delphi, thanks

     
    • Without beeing to deep in SQL I would suggest to concatenate strings, for instance

      Result := mysql.query('SELECT * FROM c WHERE '+'''+Edit1.Text+'''', True, executed);
      showmessage(Result.FieldValue(1));

      greez
        Beeti