Help access SQL Data using Hashes

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default Help access SQL Data using Hashes

    I am retrieving the following data from MySQL. I need to access the data
    via some sort of Hash or Array. I need to take this data and create a web
    page using some some of the data to create Java Script Arrays, while the
    rest is simply display on the web page. Any all help is appreciated...

    DATA:
    Itm1,Red,S,1.00
    Itm1,Red,M,1.00
    Itm1,Red,L,1.50
    Itm1,Grn,S,1.00
    Itm1,Grn,M,1.00
    Itm1,Grn,L,1.25
    Itm1,Grn,XL,1.50
    Itm2,Red,S,2.00
    Itm2,Red,M,2.00
    Itm2,Red,L,2.50
    Itm2,Brn,S,2.00
    Itm2,Brn,M,2.00
    Itm2,Brn,L,2.25
    Itm2,Brn,XL,2.50

    I would need from the above sample the following outputs:

    Itm1 - (Color Drop Down) - (Size Drop Down) - Price
    I have Java scripts that auto change Size Drop Down and Price using Java
    Script Arrays.

    I need in perl a way to create a hash/array/etc so that I can access get
    - All Unique colors for Itm1 individually through a loop (for color drop
    down)
    - All Sizes for Itm1,Color1 individually for a Java Script Array for each
    item
    - All Prices for Itm1,Color1 individually for a Java Script Array for
    each item


    Patrick Shoaf
    [email]pshoaf@model-cleanres.com[/email]


    Patrick Shoaf Guest

  2. Similar Questions and Discussions

    1. Saving hashes or encrypted passwords in MS Access
      Hi, Can anyone tell me which field type to use in Access to save hashes or encrypted passwords from VB.NET/ASP.NET? I have tried text and ole...
    2. Getting data from hashes
      I have a method 'getNetwork' that returns a hash. I can quite happily go: %reply = $network->getNetworkError('net','data','data2'); my $baseErr =...
    3. Hashes
      JohnnyIce wrote: They aren't associated. -- Tore Aursand <tore@extend.no>
    4. I need help using %Hashes
      "Horace Franklin Jr." <horace@tidalwave.net> ¼¶¼g©ó¶l¥ó·s»D :01a201c2f2eb$d2fcbb90$ada5d043@mrsp3e1puadvh3... Help! I need help using %hashes to...
    5. access denied on data access pages
      I have created data access pages that worked well when I tried them on two separate computer simutaneously, but when we went into production we got...
  3. #2

    Default Re: Help access SQL Data using Hashes

    Hi.

    I'm in the employ of Casey West, a list admin, to assist you with your
    question. I've taken the liberty to search Google using the Subject line
    you provided in your email to the list. I hope one of the links below
    will be of service to you.

    Sadly Google hasn't given us a nice, legal API for searching newsgroups,
    so you may also want to try these searches.

    [url]http://groups.google.com/groups?q=Perl+Help+access+SQL+Data+using+Hashes[/url]
    [url]http://groups.google.com/groups?q=Help+access+SQL+Data+using+Hashes+group%3 Acomp.lang.perl.*[/url]

    If you didn't get any useful results below, there's a chance your
    Subject line was not specific enough, or not detailed enough. For
    example, the following subject lines are not very good choices.

    Subject: Doubt
    Subject: HELP!
    Subject: Problem

    On the other hand, it's possible that your question is unique, or the
    search needs a human touch to get just the right results.

    Enjoy!

    Perl.org Beginners' Lists, 0 results.
    Searched: site:nntp.x.perl.org inurl:perl.beginners -inurl:show_headers Help access SQL Data using Hashes

    Perl.org Lists, 1 results.
    Searched: site:nntp.x.perl.org -inurl:show_headers Help access SQL Data using Hashes

    [1] nntp.perl.org - perl.perl6.language.subs (326)
    [url]http://nntp.x.perl.org/group/perl.perl6.language.subs/326[/url]
    ... calls all over the place (CGI, tk, SQL wrapper functions ...
    in this realm, the current proto-types are of no help. ... hash is
    really an array with hash-like-access). ...

    search.cpan.org, 10 results.
    Searched: site:search.cpan.org Help access SQL Data using Hashes

    [1] NAME DBD::ADO - A DBI driver for Microsoft ADO (Active Data ...
    [url]http://search.cpan.org/src/SGOELDNER/DBD-ADO-2.79/README[/url]
    ... arguments, 'function name') You may access the following ...
    Microsoft OLE DB Provider for SQL Server SQLState ... Wiedmann for
    additions, debuggery and general help. ...

    [2] search.cpan.org: DB::Objects - Perl extension to ease creation of ...
    [url]http://search.cpan.org/search%3Fmodule=DB::Objects[/url]
    ... were very similar: they all had access methods for ... The
    Help menu with Help topics, an optional upgrade ... the DB }
    $sth->finish; # Finished with SQL return $self ...

    [3] WebTool Help
    [url]http://search.cpan.org/src/JLISHEV/WebTools-1.27/docs/HELP.html[/url]
    ... User name used to connect SQL server $webtools ... Note: If
    your visitors use proxy toaccess your scripts ... functions and
    WebTools itself are released to help and to ...

    [4] NAME DBD::ADO - A DBI driver for Microsoft ADO (Active Data ...
    [url]http://search.cpan.org/src/SGOELDNER/DBD-ADO-2.81/README[/url]
    ... func_name ) or die ...; You may access the following ...
    Microsoft OLE DB Provider forSQL Server SQLState ... Wiedmann for
    additions, debuggery and general help. ...

    [5] search.cpan.org: DBIx::FileSystem - Manage tables like a ...
    [url]http://search.cpan.org/search%3Fmodule=DBIx::FileSystem[/url]
    ... Then start your favourite SQL editor and manually change the
    database layout according to %vdirs. ... Requires write access to
    the directory. ... Usage: 'help [command ...

    [6] <html> <head> </head><body><pre>NAME DBIx::TableHash - Tie a hash ...
    [url]http://search.cpan.org/src/CHTHORMAN/DBIx-TableHash-1.04/README[/url]
    ... &gt;create_copy($Params) or die &quot;Help!&quot;; my ...
    store into the tied hash!) Toaccess only a ... retrieval of data
    results in corresponding SQL queries being ...

    [7] NAME DBD::CSV - DBI driver for CSV files SYNOPSIS use DBI; $dbh = ...
    [url]http://search.cpan.org/src/JWIED/DBD-CSV-0.1030/README[/url]
    ... and column number from the programmer: For example MS Access
    doesn't ... 3) manpage, the Text::CSV_XS(3) manpage, the
    SQL::Statement(3) manpage For help on the ...

    [8] search.cpan.org: PApp::SQL - absolutely easy yet fast and ...
    [url]http://search.cpan.org/search%3Fmodule=PApp::SQL[/url]
    ... a lot more gimmicks to play around with to help you create ...
    The PApp::SQL::Database class does that, in a ... is currently a
    single method call per access (you can ...

    [9] search.cpan.org: DBD::CSV - DBI driver for CSV files
    [url]http://search.cpan.org/search%3Fmodule=DBD::CSV[/url]
    ... and column number from the programmer: For example MS Access
    doesn't ... DBI(3), Text::CSV_XS(3),SQL::Statement(3). For help on
    the use of DBD::CSV, see the DBI ...

    [10] <html> <head> </head><body><pre>NAME DBD::CSV - DBI driver for ...
    [url]http://search.cpan.org/src/JZUCKER/DBD-CSV-0.2002/README[/url]
    ... and column number from the programmer: For example MS Access
    doesn&#39 ... 3) manpage, the Text::CSV_XS(3) manpage, the
    SQL::Statement(3) manpage For help on the ...

    Google Search, 10 results.
    Searched: Perl Help access SQL Data using Hashes

    [1] Arlene's Homepage
    [url]http://www.cse.msu.edu/~zenglinf/htmlfiles/resume.htm[/url]
    ... Databases/E-Commerce * SQL server 7.0, MySQL, and Access. ...
    SQL, ASP, Perl/CGI, Java ... to their projects, and help them
    learn debugging facilities to improve their ...

    [2] <html> <head> </head><body><pre>&lt;html&gt; &lt;head&gt; &lt;/ ...
    [url]http://www.cse.msu.edu/~zenglinf/htmlfiles/new_resume.txt[/url]
    ... gt;&amp;gt; Databases/E-Commerce * SQL server 7.0, MySQL, and
    Access. * SQL, ASP,Perl/CGI, Java ... to their projects, and help
    them learn debugging facilities to ...

    [3] Perl Programming Classes, CGI Scripting Training Courses, Learn ...
    [url]http://www.software-skills-training.com/OnSiteCourses/Perl-Programming-Hands-On-Training-Course-Perl-Class-Seminar-Perl-Language.htm[/url]
    ... Development; Using Other Modules to Access Databases on the
    ... ModPerl; Configuring Apache with Perl and ModPerl; Apache ...
    High-Level Packages to Help Develop Scalable ...

    [4] Database Access
    [url]http://pleac.sourceforge.net/pleac_perl/dbaccess.html[/url]
    Database Access. ... &/e' | less #----usr/bin/perl -w # ggh --
    grovel ... usage: $0 [-database dbfilename] [-help] [-epochtime |
    -localtime ...

    [5] SQL Database Training Courses: Building database driven web sites ...
    [url]http://training.gbdirect.co.uk/courses/databases/building_database_driven_websites_with_perl.html[/url]
    ... Help - perdoc, books, web (inc [url]www.perldoc.com[/url] ... Hardware
    tuning; Drivers and interfaces (Perl, PHP, C++ ... Access control;
    Authorisation files; Other useful directives; ...

    [6] Perl Training Courses: Perl Programming Course Modules for ...
    [url]http://training.gbdirect.co.uk/courses/perl/customized_bespoke.html[/url]
    ... Regular expressions - regexps; Simple file handling; Help -
    perldoc, books ... Access through proxy servers; Building robots
    and parsing ... Writing Cross-Platform Perl. ...

    [7] RE: Couldn't write to Ms Access Database by DBD:ODBC :: ASPN Mail ...
    [url]http://aspn.activestate.com/ASPN/Mail/Message/perl-DBI/337583[/url]
    ... the List List Leaders Subscription Options View Subscriptions
    Help View by ... perl-DBI ... errstr, it was : > > >
    "Microsoft][ODBC Microsoft Access Driver] Operation ...

    [8] problem using WHERE in SELECT with win32::ole :: ASPN Mail ...
    [url]http://aspn.activestate.com/ASPN/Mail/Message/perl-win32-database/1688746[/url]
    ... similar issues reported with Access 97 ... Any help would be
    greatfully appreciated ... message -----
    _______________________________________________
    Perl-Win32-Database ...

    [9] Online Perl Training Courses & Tutorials - learning the easy way
    [url]http://apex.vtc.com/perl.php[/url]
    ... Please Note: You may access the first three chapters ... other
    titles in our range tohelp you evaluate ... and Packages: 2
    Database Interactivity Perl and databases ...

    [10] MySQL Forums
    [url]http://forums.devshed.com/archive/4/2003/8/2[/url]
    ... mysql ,access and myodbc....pls help; MySQL, Apache, PHP,
    Perl. Copyright © 1997-2003 Developer Shed, Inc. All rights
    reserved.

    --
    Automated Google Searches from Casey West
    Questions or Problems? [email]casey@geeknest.com[/email]
    Casey West Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139