[PHP-DB] Missing Data in Columns
Only six of ten columns in a php table show up on the web. I've been using a standard format for many months now and the only difference here is that I'm drawing on more (seven) tables. Even more curious, running the "select" and "where" statements in mysql produces the full table. Also, clicking on "Sort" in a blank "Vote" column rearranges the visible vote columns which suggests sorting based on the invisible column. Worse (which I won't try to solve here), when I delete some "select" statements the table disappears. The link and "select" statement are shown below (I won't copy the extensive "where" statement, but the table didn't appear when that was wrong). Any ideas? Ken http://congress.techpolitics.org/108thfirst.php # query mysql to get data $get_data_query = "select fullhouse2.Representative, fullhouse2.Party, medicarerollcall669.State, medicarerollcall669.CD, hr2passage.passage, estatetaxrepeal.passage, headstartvote444.vote, hudappropsvote453.vote, energyrollcall630.vote, medicarerollcall669.vote from fullhouse2, medicarerollcall669, hr2passage, estatetaxrepeal, headstartvote444, hudappropsvote453, energyrollcall630 where -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Missing Data in Columns
On Wed, 10 Dec 2003 16:21:39 -0600, Matt Matijevich
<[EMAIL PROTECTED]> wrote:
Any ideas?
could you post the code you use to output each table row?
***
Here's the code requested along with column headings and sort code:
# write out table heading
echo "\n";
echo "\n";
echo "Representative
\n";
echo "Party Sort \n";
echo "State Sort \n";
echo "District
\n";
echo "Vote Sort \n";
echo "Vote Sort \n";
echo "Vote Sort \n";
echo "Vote Sort \n";
echo "Vote Sort \n";
echo "Vote Sort \n";
echo "\n";
# write out each row
while ($row = mysql_fetch_assoc ($data_set))
{
echo "\n";
foreach (array_keys($row) as $item)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sort on Two Columns
I'm trying to sort a table on two columns but none of the options I've
tried produces the right result (though the obvious works in mysql: order
by caucuses.cbc, caucuses.state). I want to sort first by column
caucuses.cbc (which distinguishes about 1/10 of the rows) and then by
caucuses.state (which includes all rows). The CBC column designation
("B") should come first, with the rest of the CBC column blank. I'd
actually like to sort by three columns (caucuses.cd is the third).
Among others, I've tried:
echo "CBC Sort \n";
echo "CBC Sort
\n";
(This orders state first, cbc ordered at bottom by state; reversing
caucuses.cbc and caucuses.state gives state sort and cbc within state).
Thanks in advance.
Ken
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
