Autor Beitrag
Danny W.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: So 29.10.06 11:48 
Hallo,
mich würde es interessieren ob ich in MySql eine Abfrage machen kann, die mir die werte ohne feldnamen ausgibt...

so will ich es nicht:
ausblenden Quelltext
1:
2:
name     email          wohnort
kai      kai@uwe.de     geilenkirchen



so möcht ich das:
ausblenden Quelltext
1:
kai    kai@uwe.de      geilenkirchen					


wäre um jeden tipp dankbar!

mfG,
Mantis
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 29.10.06 12:01 
Wie machst du deine Abfrage? Normalerweise werden die Feldnamen nicht mit ausgegeben.

_________________
Markus Kinzler.
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: So 29.10.06 12:11 
ausblenden SQL-Anweisung
1:
SELECT nick, email, wohnort FROM user WHERE Nick="kai"					


=)

wenn ich das in meinem programm in ein memo feld ausspucken lasse, kommen immer die feldnamen mit

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TForm1.Button2Click(Sender: TObject);
var s:string;
befehl: string;
ts : tstrings;
begin
 if db1.Connect2MysqlDB('localhost','root','','verwaltung',3306,s) then
 begin

  befehl:='SELECT nick, pw, email FROM user WHERE Nick="'+edit1.text+'"';
  ts:=tstringlist.Create;
  db1.sendcmd(befehl,true,ts);
  memo2.lines.Assign(ts);
  ts.free;

 db1.DisConnectMysqlDB(s);
 end;
end;


Zuletzt bearbeitet von Danny W. am So 29.10.06 12:14, insgesamt 1-mal bearbeitet
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 29.10.06 12:13 
Und mit welchem Programm?

_________________
Markus Kinzler.
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: So 29.10.06 12:14 
hab meinen beitrag editiert..mache das alles mit delphi und Direct MYSQL
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 29.10.06 12:16 
Mit dieser Komponente kenn ich mich nicht aus, du könntest aber das Ergebnis erst ab der 2. Zeile ins Memo schreiben.

_________________
Markus Kinzler.
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: So 29.10.06 12:32 
hab ich bis jetzt auch so gelöst :) ist allerdings ne unschöne methode, weil wenn ich mehrere felder auslese, icha uch mehrere überspringen muss ^^

mfG
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 29.10.06 12:36 
Schon mal mit einer anderen Komponente versucht?

_________________
Markus Kinzler.
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: So 29.10.06 12:56 
nein. allerdings ist diese komponente auch so schön einfach :)
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: Mo 30.10.06 08:59 
Ok ich hab den Autor selbst nochmal angesprochen..es war einfach ein boolscher wert den ich mit-übergeben musste =)

mfG,
Mantis