Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Create hash from MySQL field headers
Hi all,

I've been developing a module for our accounting system and am trying
to create a hash with the names equal to the fieldnames of the
database table.

It seems as though 'ListFields' is not functioning, and am wondering
if there is another way.

I simply want to SELECT a single line from the table, have it stored
in a hash, with the name as the fieldname and the value as the actual
data.

Any help would be greatly appreciated, and I am not afraid to go
R'ingAFM if someone could supply decent links.

TIA,

Steve


Report this thread to moderator Post Follow-up to this message
Old Post
Steve Bertrand
09-30-04 07:55 AM


Re: Create hash from MySQL field headers
Steve Bertrand wrote:

> Hi all,

Hello,

> I've been developing a module for our accounting system and am trying
> to create a hash with the names equal to the fieldnames of the
> database table.
>
> It seems as though 'ListFields' is not functioning, and am wondering
> if there is another way.
>
> I simply want to SELECT a single line from the table, have it stored
> in a hash, with the name as the fieldname and the value as the actual
> data.
>
> Any help would be greatly appreciated, and I am not afraid to go
> R'ingAFM if someone could supply decent links.

perldoc DBI
look for selectrow_hashref

HTH :)

Lee.M - JupiterHost.Net

Report this thread to moderator Post Follow-up to this message
Old Post
JupiterHost.Net
09-30-04 07:55 AM


Re: Create hash from MySQL field headers
> Steve Bertrand wrote:
> 
>
> Hello,
> 
>
> perldoc DBI
> look for selectrow_hashref

Mucho gracias... I'll look it up, but the name certainly implies that
it is what I am after.

> HTH :)

I'm certain it will.

Thanks again!

Steve

>
> Lee.M - JupiterHost.Net
>



Report this thread to moderator Post Follow-up to this message
Old Post
Steve Bertrand
09-30-04 07:55 AM


Re: Create hash from MySQL field headers
>>perldoc DBI 
>
>
> Mucho gracias... I'll look it up, but the name certainly implies that
> it is what I am after.

Glad I could help :)
 
>
> I'm certain it will.
>
> Thanks again!
>
> Steve
> 


Report this thread to moderator Post Follow-up to this message
Old Post
JupiterHost.Net
09-30-04 07:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:38 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.