JupiterHost.Net [mailto:[EMAIL PROTECTED] 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