Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: how do get value of mysql column

by Koolstylez (Scribe)
on Nov 30, 2005 at 18:58 UTC ( [id://513051]=note: print w/replies, xml ) Need Help??


in reply to how do get value of mysql column

The following SQL statement should do the trick:

SELECT <column_name> FROM <table_name>

If you only want the column value for certain records, filter it like so:

SELECT <column_name> FROM <table_name> WHERE <clause>

As for a tutorial, I would suggest finding a good SQL tutorial on Google, there are tons of them.

Hope this helps...

Replies are listed 'Best First'.
Re^2: how do get value of mysql column
by bageler (Hermit) on Nov 30, 2005 at 19:00 UTC
    using dbi:
    $sth = $dbh->prepare("SELECT column FROM table"); $sth->execute; $column_value = $sth->fetchrow;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found