dcsimg
Results 1 to 3 of 3

Thread: [RESOLVED] combined row if there condition

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    Resolved [RESOLVED] combined row if there condition

    i have mysql table

    #
    # Table structure for table tb_test_copy
    #
    CREATE TABLE `tb_test_copy` (
    `Newsid` int(11) NOT NULL AUTO_INCREMENT,
    `news` varchar(160) DEFAULT NULL,
    `Multipart` tinyint(3) DEFAULT NULL,
    `MultipartRef` varchar(10) DEFAULT NULL,
    `MultipartCount` smallint(6) DEFAULT NULL,
    `ThisPart` varchar(10) DEFAULT NULL,
    PRIMARY KEY (`Newsid`)
    ) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;
    #
    # Dumping data for table tb_test_copy
    #
    INSERT INTO `tb_test_copy` VALUES (28,'action',0,'',0,'0');
    INSERT INTO `tb_test_copy` VALUES (29,'drama',0,'',0,'0');
    INSERT INTO `tb_test_copy` VALUES (30,'Part 1',1,'A',2,'1');
    INSERT INTO `tb_test_copy` VALUES (31,'Part 2',1,'A',0,'2');
    INSERT INTO `tb_test_copy` VALUES (33,'song',0,'',0,'0');


    i don't know how to explain my problem, but i have picture. i want merge row that have multipartcount and combine with same MultipartRef sort by ThisPart when merge. thanks for forum help
    Name:  mysql.jpg
Views: 111
Size:  9.9 KB

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Java (JSP) Hell!
    Posts
    5,314

    Re: combined row if there condition


    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    Re: combined row if there condition

    Quote Originally Posted by Ecniv View Post
    exactly that i want. thanks my friend.sorri for late reply

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width