Menu

WHERE 'command?'

Help
2006-08-22
2013-04-02
  • Nobody/Anonymous

    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

     
    • Nobody/Anonymous

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.