Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

How can I pass number of rows value in psql table into HTML?

by Anonymous Monk
on Mar 12, 2001 at 22:48 UTC ( [id://63893]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Replies are listed 'Best First'.
Re: How can I pass number of rows value in psql table into HTML?
by tye (Sage) on Mar 12, 2001 at 23:18 UTC
    Personally, I don't have a clue what you are talking about. Here are some suggestions:

    Get a login with this site you can better track your postings and people have more options on how to communicate with you.

    Read the site documentation.

    Post a much more clear question about this to Seekers of Perl Wisdom. It may not show up right away as content there is "moderated" but, since you will have followed my previous advice, you'll be able to find your question in your list of write ups and can set your user settings (both from your home node) to notify you when someone replies, even if your question is never "approved".

    I plan to delete this question (and my answer) when it appears that you've read my message (unless someone comes up with a better idea).

      questions looks clear as day to me. He has a psql table, and he's using perl probably for a cgi script. He wants to use the # of rows value inside his cgi script. But he doesn't know how to find this out. I'd like to know too.
Re: How can I pass number of rows value in psql table into HTML?
by arhuman (Vicar) on Mar 13, 2001 at 18:20 UTC
    If you mean getting the number of row in a table via a DBI access (guessing too) :
    A 'select * from yourtable' as a query
    and a fetchrow_array would return an array,
    you'll only have to count the number of item in this array
    (each item is column...)
Re: How can I pass number of rows value in psql table into HTML?
by psini (Deacon) on May 19, 2008 at 19:31 UTC

    SELECT count(*) FROM yourtable is much better: it is faster and avoid transferring to your program the contents of the entire table (with huge tables this can make a huge difference)

    This statement return only one row, with only one integer value, which is the number of rows in yourtable

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://63893]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-19 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found