Avoid multiple outputs of same record in MySQL -
i have query works multiple conditions when selecting record.
select uid, uid2, up, datediff(current_timestamp, tim) \"dt\", id, behind, sid, spid z_uup, z_snoop, z_wshop (z_wshop.sid='5555' or z_snoop.id='5555' ) , ( z_uup.uid=z_snoop.id or z_uup.uid2=z_snoop.id or z_uup.uid=z_snoop.behind or z_uup.uid2=z_snoop.behind or z_uup.pid=z_wshop.spid ) order z_uup.tim desc;
the table z_uup
has single entry seems 15 repetitions of same out put. why happening , how can solve this.
did try using distinct?
select distinct field1, field2, ... table1...
that way repeat records not displayed.
if makes slower, try group field z_uup.
Comments
Post a Comment