Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Inserting more than one entry into a MySql DB

by dws (Chancellor)
on Feb 01, 2002 at 14:14 UTC ( #142744=note: print w/replies, xml ) Need Help??


in reply to Inserting more than one entry into a MySql DB

Show us the line that sets up @icodes. If, as you say, it is   @icodes="CEN01-SJU1-022102A CEN02-MEX1-022702P CTE01-SJU1-022202A CTE02-MEX1-022802P"; then it only contains a single element. To make that an array, do something like   @icodes=qw(CEN01-SJU1-022102A CEN02-MEX1-022702P CTE01-SJU1-022202A CTE02-MEX1-022802P);

Replies are listed 'Best First'.
Re: Re: Inserting more than one entry into a MySql DB
by Kiko (Scribe) on Feb 01, 2002 at 14:45 UTC
    Hi,
    I retrieve the icodes as such:
    @icodes = split(/,/, $q->param('icodes'));
    Are you saying that i should just leave it alone?
    Thanks
    -Kiko
      I retrieve the icodes as such:
      @icodes = split(/,/, $q->param('icodes'));
      Are you saying that i should just leave it alone?

      That should work. I think screamineagle nailed this one. You might be trying to reuse a primary key. Adding error checking after the execute() might reveal this as a problem.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2023-12-04 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (25 votes). Check out past polls.

    Notices?