0

Hello, I would love to display the values of 65 columns which have been added and then display them on the screen, at the moment only 59 of the 65 columns added appear. here is my code.

$result = mysql_query("SELECT SUM(segment) AS segment, SUM(funct) AS funct,SUM(pronoun) AS pronoun.............. right up to column 65");

$row = mysql_fetch_assoc($result);

//display them onto the screen
echo '<br/>' . $row.'<br/>' . $row.'<br/>' . $row.........right up to column 65;

I think there might be columns which add up to zero and the code then reads it as an empty string, but I don't think that there are more than 2 which are zero. If there might be another explanation of this please assist.

Your help will be highly appreciated.

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by kgizo
0

The only thing I can think of with such a long query is that you have used the same alias name twice. There is no logical reason that mysql does not return or show a single column.

Apart from this, I'd like to advise you to create a view with this query, so in code you can just do: SELECT * FROM my_sum_view

0

Hi priteas I just checked my query and there wasn't a single typing error or duplication of fields, I'll try viewing it then. Thank you very much!!!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.