Using Delphi 2010, I have used TSQLQuery and TSQLConnection to connect to a remote MySQL server. I have used an SQL query as follows:
SQLQuery1.SQL.Text := 'SELECT * FROM registered WHERE email="'+email+'" and login_pass="'+password+'"';
SQLQuery1.Open; // Open sql connection
What should I do to list or display the data selected by this query?
When I type
SQLQuery1['who']; // The resault is : James Kan
I think it is displaying the very last item in the list. But I want to display each item, as I could with the foreach loop in PHP. How could I create, for example, a TLabel for each item?
You just iterate over the resultset like