RE: Possible to get field names and types in a table without executing a query?
- From: rjk-dbi@xxxxxxxxxxx (Ronald J Kimball)
- Date: Tue, 27 Jun 2006 17:58:17 -0400
JupiterHost.Net [mailto:mlists@xxxxxxxxxxxxxxx] wrote:
It is much more easily portable.
Suppose you have a real query:
select a.foo, b.bar.c.baz
from
a, b, c
where .....
The 0= 1 method works for that too. Contrast that with parsing the
from clause and the where clause to create a tabel catalog query. Yuk.
How can you gaurantee all DB engines will return the column names with
no value on an empty query?
For instance I'd expect fetchall_hashref() to return {} on a query with
no results...
It doesn't matter what fetchall_hashref() returns. You get the list of
columns from $sth->{NAME}.
Ronald
.
- References:
- Re: Possible to get field names and types in a table without executing a query?
- From: JupiterHost.Net
- Re: Possible to get field names and types in a table without executing a query?
- Prev by Date: Re: Possible to get field names and types in a table without executing a query?
- Next by Date: RE: Oracle question
- Previous by thread: Re: Possible to get field names and types in a table without executing a query?
- Next by thread: Re: Possible to get field names and types in a table without executing a query?
- Index(es):
Relevant Pages
|
|