If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Delphi.... Again....

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-24-04, 09:48
Azazel Azazel is offline
Registered User
 
Join Date: Mar 2004
Location: Latvia
Posts: 1
Delphi.... Again....

Hi all, Im newbie here and newbie in Delphi. I want to use MySQL there. I use file mysql.pas which provides almost same functions as in PHP Have problem allready -


Q := 'SELECT name, mail FROM users';

mysql_query(db, PChar(Q));

res := mysql_use_result(db);

showmessage(inttostr(mysql_num_rows(res)));

for i:=0 to mysql_num_rows(res) do begin
row := mysql_fetch_row(res);
Form1.usersGrid.Cells[0, i+1] := row[0];
Form1.usersGrid.Cells[1, i+1] := row[1];
end;

mysql_free_result(res);


WHY ON EARTH there is only one row returned????
Thanx
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On