Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I am trying to create a new object and fill its name property with a value from the array/list.(I really don't know anymore) The name is actually supposed to be a database-wide key. I want to extract the information from the database and put it into the object.

Here's the story that I didn't want to bore anyone with.

When an "extract" is performed here at present, they perform too many steps. (create temp table in database, populate temp table, use "DataJunction" to export temp table info to file, clean up database)

My idea was since they are using Perl already to parse data from outside sources, we could use Perl to do the "extracts." Perl would be perfect for that.

Since the Product that I support will be going away (we hope), and changing to an OO thing, Ifigured that we could use OO in Perl to do "extracts" and the converse which is "Loads." This way our objects could WDDX all their information over to the new objects. Also the database would be left alone to do what it does best.

My "extract" object gets the database-wide key, and creates a "profile" object that contains all the fields from the database. This is exactly what I wanted. This is exactly what I want because we can take the "profile" and write it to the database or the WDDX or a file and it can be populated from any source like the database, or WDDX or a file.

If you are still awake, here is where I am slightly stuck. My "extract" opens all the proper files, and retrieves the database-wide key according to the proper parameters. Now I need to take this list(extract_object->list_of_database_wide_keys) and create a "profile" object for each one and then write it to the files.

I keeping getting a SQL statement like "select * from table where database_wide_key = ARRAY(XXXXXXXX)"
I just don't know how to properly dereference that array reference. I've gotten SQL errors like cant convert CHAR 'ARRAY(XXXXXXX)' to INT4 field.

My forehead is flatter and embedded with small shards of busted monitor.


In reply to Re: Re: Re: Dereference an array reference by fmogavero
in thread Dereference an array reference by fmogavero

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-24 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found