I agree with Uberfuzz, can we see a sample of what your table is holding?
Could you maybe export say the first 10 rows into a text file, zip them and attach them to a post using the attach files function, this would at least allow us to see the structure of the database.
From reading your description, you appear to be under the impression that a column in the DB is fully accessible as an array of all the records down that column when you select some data, but it's not. Your data is actually retrieved across in rows.
So in your description of columns above, if you have :
id | n1 | v1 | v2 | v3 | c1
The every time you do a "$row = mysql_fetch_assoc($res)" you will get an array that looks like this :
$row['id'] = id;
$row['n1'] = n1;
$row['v1'] = v1;
$row['v2'] = v2;
$row['v3'] = v3;
$row['c1'] = c1;
If you have the following data :
0,1,2,3,4,5
1,6,7,8,9,10
2,11,12,13,14,15
Then for 3 runs round a loop you'll get the following :
Loop 1
$row['id'] = 0;
$row['n1'] = 1;
$row['v1'] = 2;
$row['v2'] = 3;
$row['v3'] = 4;
$row['c1'] = 5;
Loop 2
$row['id'] = 1;
$row['n1'] = 6;
$row['v1'] = 7;
$row['v2'] = 8;
$row['v3'] = 9;
$row['c1'] = 10;
Loop 3
$row['id'] = 2;
$row['n1'] = 11;
$row['v1'] = 12;
$row['v2'] = 13;
$row['v3'] = 14;
$row['c1'] = 15;
At first glance it appears to me that for every 3 rows, your storing 3 sets of values, but quite what the significance of those values are i can't quite work out.
If this is what your doing, then each time round the loop your going to need to read 3 rows.
$row1 = mysql_fetch_assoc($res);
$row2 = mysql_fetch_assoc($res);
$row3 = mysql_fetch_assoc($res);
Then your 3 sets of values for N1 would be in, $row1['n1'],$row2['n1'] and $row3['n1'] respectively.
However this is just a guess based on how i read your initial description.
It may also help if you could point us to the chart script your using too, se we can all see how it expects the data to be provided to it.
Cheers
Shawty