and this my code :
Code: Select all
var
Db:TZConnection;
query:TZQuery;
begin
Db:=TZConnection.Create(nil);
Db.Protocol:='mysql';
Db.HostName:='localhost';
Db.Database:='bali';
Db.User:='root';
Db.Password:='';
query:=TZQuery.Create(nil);
query.SQL.Clear;
query.SQL.Add('SELECT * from inbox limit 0,10');
query.Open;
query.Last;
writeln(query.FieldByName('Text').AsString);
query.Close;
Db.Free;
end;