Re: [PHP-DB] Changing part of a query before displaying it

2009-07-15 Thread Patrick Price
I believe your best bet is to change how you are iterating through the $row data. Since there are only 6 columns of data, I think the simplest solution is to remove the foreach() and handle each column's data independently, ie: while($row = mysql_fetch_row($result10)) { print ' tr

Re: [PHP-DB] Changing part of a query before displaying it

2009-07-15 Thread Don Collier
Would that work for multiple rows though? This is getting a varying number of rows. Patrick Price wrote: I believe your best bet is to change how you are iterating through the $row data. Since there are only 6 columns of data, I think the simplest solution is to remove the foreach() and

Re: [PHP-DB] Changing part of a query before displaying it

2009-07-15 Thread Patrick Price
Yes, the while loop will retrieve all the rows from the database. The foreach loop you had been using was retrieving all the data from each row. The only appreciable difference between your code and mine is in the circumstance, if you added more columns to the database, you would need to add more