Jump to content

shan2batman

Members
  • Content Count

    90
  • Joined

  • Last visited

Community Reputation

0 Neutral

About shan2batman

  • Rank
    Regular Member
  1. i understand pm your email ill send the sql file it is not live so it aint harmful.@barand
  2. i added another table here just posted to let you know the changes.Plus isn't there any way for me to get those unique values???? @Barand
  3. here is an update on the results: gp_id pid gname author_gp type title data pdate vote_up vote_down user_id_g group_id comment_id comment_body time_c os_id author_c type_c vote_up_c vote_down_c user_id_c gm_id gname mname
  4. yes it is, but how do i correct the group_id values because it is the reason why i posted it in our forum @Barand
  5. finally i managed to fetch data from tables but the problem now is even after using distinct, groupby and having clauses the result is producing duplicate results its killing my brain @requinix can you point me where it is going wrong this is the updated query: select distinct g.* ,gp.*,up.*, u.uname,u.avatar,u.user_id from group_posts as g left join user as u on u.uname=g.author_gp left join updates as up on up.author=u.uname left join groups as gp on g.group_id=gp.g_id where g.gname='MEP news' and u.uname='shan2batman' GROUP by g.data,up.update_body having u.uname='shan2batman'an
  6. @Barand but there are no ids matching the group between diferrent columns.
  7. here is the EXPLAIN output: @requinix id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE updates ALL NULL NULL NULL NULL 36 Using where; Using temporary; Using filesort 1 SIMPLE group_photos ALL NULL NULL NULL NULL
  8. it produces no results just empty rows. how can i share data with you to trouble shoot the problem???? @requinix
  9. here is my trimmed code for update select user.uname, friends.friend_one,friends.friend_two,updates.update_id,updates.update_body,updates.time,updates.title,updates.vote_up,updates.vote_down,updates.user_id_u,updates.account_name,updates.author, groups.name,groups.creator,groups.logo,group_photos.g_p_id,group_photos.avatar, group_photos.g_id, group_posts.gp_id,group_posts.pid,group_posts.author_gp,group_posts.type, group_posts.title, group_posts.data, group_posts.pdate,group_posts.vote_up, group_posts.vote_down, group_posts.user_id_g from user inner join friends on friends.friend_on
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.