Click here to Skip to main content
11,811,971 members (67,842 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: (untagged)
$insq='SELECT subcode FROM 2-1subjects';
    if(!$insq) { die('invalid Query:'.mysql_error()); }
          //print_r ($insre);
           print_r ($mark).'<br>';
            print_r ($subrow).'<br>';
            $inser='INSERT into `2-1`(id,subcode,marks)
                  print $subrow['subcode'].'<br>';
                die('invalid Query:'.mysql_error());

my problem is i want to retrieve a column from the table "2-1subjects", that contains a coumn such as

2-1sub#1 2-1sub#2 2-1sub#3 2-1sub#4 2-1sub#5 2-1sub#6 2-1sub#7 2-1sub#8

Now i want to insert the same column in same order into the table "2-1".

but it inserted in reverse order such as

2-1sub#8 2-1sub#7 2-1sub#6 2-1sub#5 2-1sub#4 2-1sub#3 2-1sub#2 2-1sub#1. I don't know the reason. please tell me and correct my code. Thanks in advance
Posted 15-Jan-13 16:19pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 KrunalRohit 319
1 Abhinav S 215
2 Palash Mondal_ 210
3 CHill60 180
4 CPallini 135
0 OriginalGriff 3,893
1 KrunalRohit 2,441
2 CPallini 2,240
3 Maciej Los 2,155
4 ppolymorphe 1,725

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100