RE: [PHP-DB] Can't use field names in print

2002-01-13 Thread Beau Lebens
you should be able to just change the mysql_fetch_row to a mysql_fetch_array and then use the names rather than the numbers in your print (modified below, not tested :) // "); // } // ?> /beau -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Re: [PHP-DB] Can't use field names in print

2002-01-13 Thread planomax
Thanks for the quick response. I left out the part you mention, here is the whole code (the one that works); "); } ?> I just can't seem to be able to access the array using the column names from the table. Pete "Beau Lebens" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAI

RE: [PHP-DB] Can't use field names in print

2002-01-13 Thread Beau Lebens
you need to use the *_fetch_array() functions i.e. if you are using MySQL $SQL = "something"; // build SQL query $result = mysql_query($SQL); // execute query, save all results in $result $firstResult = mysql_fetch_array($result); // create an array containing each returned record // subsequent