Problem with SQL QUERY and timestamp
Posted: 24.10.2005, 16:28
Code: Select all
ZQuery1.SQL.Clear;
MessageBox(0, PChar('SELECT unix_timestamp(end)-unix_timestamp(now()) as vreme FROM sessions WHERE uid="' + Form2.IDKorisnika + '" and status="a"'), 'sd', MB_OK);
ZQuery1.SQL.Add('SELECT unix_timestamp(end)-unix_timestamp(now()) as vreme FROM sessions WHERE uid="' + Form2.IDKorisnika + '" and status="a"');
ZQuery1.ExecSQL;
minuti := ZQuery1.FieldByName('vreme').AsInteger;
Anyone know what is the problem?!!?!
When i run query from mysql FRONT or mysql client its ok...