Hi Rhino
> If your table name is bar and it is in a database named foo, the following > commands will show you the columns in that table: > > describe foo.bar; > > -OR- > > show columns from foo.bar; > > If you try either command on a table that does not exist, you get an error > message. Therefore, the query only returns the fields if the table exists. > > Is that what you wanted? That's how I understood your question.... yes, this is what i want, now to get the name of fields and i should use MYSQL_FIELD with the result returned from the query like MYSQL_RES * res; MYSQL_FIELD *field; mysql_query(my," show columns from foo.bar"); res = mysql_use_result(my); for (i:= 0; i<=mysql_num_rows(res); i++) { field=mysql_fetch_field_direct(res,i); do ant thing with field Right Regards Luiz --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.588 / Virus Database: 372 - Release Date: 13/2/2004 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]