perl dbi sybase number of columns?

J

jcharth

hello i am using perl dbi with sybase, i know that in php is easy to
find out the number of columns with any sql query. is there a way to
know how many values are stored in the array that stores the result of
the query? any code samples? thank.s
 
D

DJ Stunks

hello i am using perl dbi with sybase

The whole point of the DBI is to (and I quote) "provide a consistent
database interface, independent of the actual database being used."
Therefore it is entirely unimportant that you are querying a Sybase
database.
i know that in php is easy to
find out the number of columns with any sql query.

Isn't PHP great?
is there a way to
know how many values are stored in the array that stores the result of
the query? any code samples? thank.s

did you read the documentation for the module you're trying to use? or
did you think it would be easier to have us read it to you?

perldoc DBI

hint: pay particular attention to the section on "Statement Handle
Attributes"

-jp

PS: I've got $5 that says the response to this message will have no
context at all or will be a top post. I can feel it!
 
D

DJ Stunks

Thanks guys, yes php is great. I got it with

foreach (@row){
print "$_ ,"

lmao

I think you all owe me $5. please make cheques or money orders payable
to DJ Stunks :p

-jp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top