Re: [PHP-DB] Failed to query correctly.

2001-12-04 Thread Dobromir Velev
Hi, I just looked over the code I sent and I saw that there is a bug there. Here's the corrected version. This one is tested and it works fine $query="SELECT * from $tbl"; $result=mysql_db_query($db,$query) or mysql_die(); echo ""; while ($line = mysql_fetch_assoc($result)) { if (!$firstrow){

Re: [PHP-DB] Failed to query correctly.

2001-12-04 Thread Dobromir Velev
Hi, The code looks fine to me - it will output all records in the selected table. I assume that you want to display the field names as a first row. If this is the case you could use something like this $query="SELECT * from $tbl"; $result=mysql_db_query($db,$query) or mysql_die(); echo ""; whi