PERL CGI drop down list

2006-06-16 Thread Mark Martin
Hi, does anybody have the correct syntax for using a drop down list. I'm using the object oriented type syntax for CGI. For example my text boxes are printed thus : $cgi = new CGI; print $cgi-input({-type=text,-name=textbox01,-class=textbox}) drop down list innormal html would be : select

regex for date dd-mmm-yy

2006-06-06 Thread Mark Martin
Hi, would anybody have to hand a regex for date dd-mmm-yy. I want to be able to validate dates that should be along the lines of : 06-jan-06 Cheers. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

CGI - Tables and Stylesheet

2006-05-02 Thread Mark Martin
Hi, I'm new to stylesheets - currently my html report picks the style for a table from the stylesheet but I have a number of table printing on my html report and I'd like to format each differently. here's the table code : print table({-border=undef}, Tr({-align=CENTER,-valign=TOP},

MIME::Lite HTML email

2005-05-14 Thread Mark Martin
Hi, why do I get the following in the body of my email when I use MIME::Lite to send a html formatted email and how can I get rid of it: Content-type: text/html Content-transfer-encoding: binary Content-disposition: inline Content-length: 155 Thanks, Mark -- To unsubscribe, e-mail: [EMAIL

grouping mechanism

2005-05-11 Thread Mark Martin
HI, I want to provide remittance slips to my suppliers. I've extracted data from my payments database and pushed records into an array. Here is a sample of data from that array : 01,supplierA,100.00,1st May 2005 02,supplierB,100.00,3rd May 2005 03,supplierC,100.00,3rd May 2005

Different key in 2 hashes

2005-02-01 Thread Mark Martin
Hi, okay - straight out of the coobook : my @different = () foreach (keys %hash1) { delete $hash1{$_} unless exists $hash2$_}; push(@this_not_that,$_) unless exists $registered{$_}; } easy to remove the different key from hash one and record the removed item in @different. My question is

RE: Different key in 2 hashes

2005-02-01 Thread Mark Martin
Thank you - worked a treat. At 09:00 01/02/2005 -0500, Bob Showalter wrote: Mark Martin wrote: Hi, okay - straight out of the coobook : my @different = () foreach (keys %hash1) { delete $hash1{$_} unless exists $hash2$_}; push(@this_not_that,$_) unless exists $registered

no rows selected

2005-01-28 Thread Mark Martin
Hi, I'm running a test to see whether certain criteria in a SELECT statement return record or not. If I get a no rows selected from SQL then I want to perform a specific action . But I don't how perform the test for no rows selected ? $sql = qq{SELECT RECORD FROM TABLE WHERE FIELD = ? } ;

Control structures

2005-01-21 Thread Mark Martin
Hi , I'm getting confused as to whether I need a last, next, redo or all of the above : foreach $file_item ( @file_items ) { ($file_item_code,$file_item_description) = split /,/,$file_item ; $count ++; $sth-execute($file_item_code); while ( @fetch = $sth-fetchrow ) {

Re: Array with unique elements only

2004-05-21 Thread Mark Martin
Thanks Ramprasad - that works. At 17:29 20/05/2004 +0530, Ramprasad A Padmanabhan wrote: Wow, unique items is surely an FAQ. But here you dont need to filter the array, just see the answer inline On Thu, 2004-05-20 at 17:07, Mark Martin wrote: Hi, I'm moving database data from table to table

Array with unique elements only

2004-05-20 Thread Mark Martin
Hi, I'm moving database data from table to table and want to make sure I'm getting only unique records. Only want unique $field1 and was looking at the cookbook code, but for that I have to populate a hash and then re-inspect through before inserting uniques, something like : %ucnt = ();

Load a CSV / Excel File into a database table

2004-04-15 Thread Mark Martin
Hi I've thrown this query at the mailing list before but I'm still stuck I'm afraid. I have an Excel file with a worksheet that looks like: A BC D - 1¦ STUD_ID GEOG MATH 2¦1

My DBI script wont UPDATE a Table!

2004-04-02 Thread Mark Martin
Hi, I designed my application on a test database and it worked fine without commiting the database handle. But now when I've moved it to the production database my updates wont commit - even when I do issue a commit on the DBH?!?! while(certain condition) {

Re: DBI, DBD question

2004-03-16 Thread Mark Martin
Pretty new to PPM myself but I have gotten DBD and DBI working fine on ActiveState for windows through it. PPM does take a bit of tricking around and I've found you are much better off creating local repositories. Here's 'tips n tricks' sheet that may help. - Original Message - From:

DBI - an easier way??

2004-03-10 Thread Mark Martin
Hi, bin using DBI for a while for data warehousing type stuff and up till now I've had to change data on the fly as it moves from one database to another : my $sql01 = qq{SELECT FIELD01 .FIELDn FROM PRODUCTION_TABLE}; my $sql02 = qq{INSERT INTO ACC_LEDG VALUES (?,?,?); my $sth =

problems parsing web form information into a perl script

2004-03-03 Thread Mark Martin
Hi, I've got a web form that allows a user to browse to an excel file on their computer and input it and the year as parameters to run a perl script FORM : input type=file value=excel name=file size=15 input type=text name=year size=15 SCRIPT: use CGI; use Spreadsheet::ParseExcel; $q=new CGI;

problems parsing web form information into a perl script

2004-03-03 Thread Mark Martin
Hi, I've got a web form that allows a user to browse to an excel file on their computer and input it and the year as parameters to run a perl script FORM : input type=file value=excel name=file size=15 input type=text name=year size=15 SCRIPT: use CGI; use Spreadsheet::ParseExcel; $q=new CGI;

Uploading a CSV file to a Database Table

2004-02-04 Thread Mark Martin
I'm pulling my hair out trying to find out how to upload this data. My files can vary in numbers of rows and columns but the x and y axis always contain the same type of metadata - in my case cost centre and cost item. A sample of the data would look like :

Re: Uploading a CSV file to a Database Table

2004-02-04 Thread Mark Martin
(row 0 values) = blahblah Mark - Original Message - From: James Edward Gray II [EMAIL PROTECTED] To: Mark Martin [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:34 PM Subject: Re: Uploading a CSV file to a Database Table On Feb 4, 2004, at 6:50 AM, Mark

Dump Excel File to Database table

2004-01-26 Thread Mark Martin
Hi, I've got my Spreadsheet::ParseExcel module and I can parse it using the Linux example: parsing from Teodor Zlatanov at http://www-106.ibm.com/developerworks/linux/library/l-pexcel/ but I'm not sure how it works. I need to upload an Excel Sheet to a database table and I'm having trouble

Re: DBI and Unique Keys

2003-06-04 Thread Mark Martin
Bob, thanks! That worked fine. Went with no. 2 . No, those are not the original table and column names. Thanks again for takin the time. Mark - Original Message - From: Bob Showalter [EMAIL PROTECTED] To: 'Mark Martin' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 2:02

Re: DBI and Unique Keys

2003-06-03 Thread Mark Martin
statement 2: $DBI::errstr\n; } $dbh1 -disconnect(); $dbh2 -disconnect(); exit; - Original Message - From: Bob Showalter [EMAIL PROTECTED] To: 'Mark Martin' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, June 02, 2003 2:14 PM Subject: RE: DBI and Unique Keys Mark

DBI and Unique Keys

2003-05-31 Thread Mark Martin
Hi, I have an Oracle table with a Unique Key which is generated by a trigger : CREATE TRIGGER MYTRIGGER before insert on MYTABLE for each row begin select MYSEQUENCE.nextval into :new.MYCOLUMNAME from dual; end; And this works fine on normal insert When I try to insert from a perl script I

Re: Content-type: text/html

2003-05-27 Thread Mark Martin
AM, Mark Martin wrote: but when processeed the resulting html doc actually prints Content-Type: text/html; charset=ISO-8859-1 OR Content-type: text/html at the start of the page. Is there any way to hide this? (the rest of the html output is fine) -- To unsubscribe, e-mail

DBI script won't run as cron job

2002-08-29 Thread Mark Martin
I'm concious that this might be a Linux problem but maybe someone on the list has had the same issue and solved it. I copied out below one of the simplest functions from a perl script that I need to schedule every day. When I run it interactively the table truncates fine and I get all the print

Fianacial Julian Dates

2002-01-17 Thread Mark Martin
Hi, I'm trying to use the Time::JulianDay module to work with Julian Dates. However the dates are in a Financial system where today - 17/01/02 is represented by the Julian Date 102017. Any Julian Date calendee though will tell you today is 2452291.5 I'm lost - does anybodsy have any ideas? Mark

UNIQUE KEY

2002-01-15 Thread Mark Martin
Hi, I'm trying to maintain a unique key in an Oracle Table while working on the table using DBI. the unique key is just a no. read in from a txt file and incremented for each record - supposedly. In fact I'm getting unique constraint violation. Can anybody tell me what is wrong with this

BETWEEN Comparison Operator

2001-10-18 Thread Mark Martin
(IF ELSIF) and the action repeated. What I want is a Between operator for the range -10 to 10. Any ideas, Mark _ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249 -- To unsubscribe, e-mail

Newbie Deleting Table Records Problem

2001-07-10 Thread Mark Martin
_ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

DBI and MS Access????

2001-05-14 Thread Mark Martin
: $dbh1 = DBI-connect( dbi:??:??, username, password ) . Do I need some software for this? Cheers, Mark _ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

foreach Trouble

2001-05-11 Thread Mark Martin
_ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

IF statements

2001-05-01 Thread Mark Martin
is something called a case. but I can't find the syntax anywhere. Cheers. _ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Problem Binding Variables : DBI

2001-04-26 Thread Mark Martin
); _ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Removing Leading Zeros

2001-04-19 Thread Mark Martin
Hi all, I have sucked two substrings into two variables : $index = substr $_, 35, 11; $value = substr $_, 64, 6; These variables may or may not have leading zero/s : 09/99/000999and so on. If they do I need to strip away the leading zeros. Any ideas? Mark