RE: Strange behaviour while using DBI with binding

2010-08-19 Thread Babale Fongo
tman; beginners@perl.org => Subject: Re: Strange behaviour while using DBI with binding => => On Wed, Aug 18, 2010 at 19:55, Babale Fongo => wrote: => snip => > In the first example, DBI always passed the value for offset and => ignored the => > second value after the c

Re: Strange behaviour while using DBI with binding

2010-08-19 Thread Dr.Ruud
Babale Fongo wrote: 2) This works fine (with or without space in the string). my $sth = $dbh->prepare(qq{ Select fname, lname, dob, substr(desc, 1, 200) from user left join personal_data on user.id = personal_data.id where gender = ? and position = ? order by lname limit $l

Re: Strange behaviour while using DBI with binding

2010-08-19 Thread Chas. Owens
On Wed, Aug 18, 2010 at 19:55, Babale Fongo wrote: snip > In the first example, DBI always passed the value for offset and ignored the > second value after the comma. > > I'm now using the second code as it works without problem even if string > contains space. I just need to understand why DBI be

Re: Strange behaviour while using DBI with binding

2010-08-19 Thread Robert Wohlfarth
On Wed, Aug 18, 2010 at 6:55 PM, Babale Fongo wrote: > Below are 2 pieces of code. Both have been tested with space in the string > and again without space. > > $limit = "$offset,$number_rows" or $limit = "$offset, $number_rows"; > > [snip...] > > 2) This works fine (with or without space in the

RE: Strange behaviour while using DBI with binding

2010-08-18 Thread Babale Fongo
>From your last comments, I am not sure where this is leading to, but here is all I have to say. Below are 2 pieces of code. Both have been tested with space in the string and again without space. $limit = "$offset,$number_rows" or $limit = "$offset, $number_rows"; 1) This does not work (with

Re: Strange behaviour while using DBI with binding

2010-08-18 Thread Uri Guttman
> "MC" == Mimi Cafe writes: MC> You asked why I am concatenating the 2 scalars, comma and the space below? MC> my $limit = "$offset" . ', ' . "$number_rows"; MC> I agree your suggestion below should work as well, but I was desperate to find the error, so I tried several option to se

RE: Strange behaviour while using DBI with binding

2010-08-18 Thread Mimi Cafe
1 17 Query SELECT fname, lname, dob, substr(desc, 1, 200) FROM user LEFT JOIN personal_data ON user.id = personal_data.id WHERE gender = 'male' and position = 'HR Admin' order by lname LIMIT 20 Quit => -Original Message----- => F

Re: Strange behaviour while using DBI with binding

2010-08-17 Thread Uri Guttman
> "MC" == Mimi Cafe writes: MC> I experienced a strange behaviour while using DBI binding for MySQL query MC> with LIMIT clause. My CGI program behaved so strange and the result was MC> always unpredictable and it took me several hours before I finally detected MC> the problem.

Re: Strange Behaviour while string concatenation

2008-02-12 Thread Chas. Owens
On Feb 12, 2008 5:51 AM, Rajpreet <[EMAIL PROTECTED]> wrote: > Greetings, > > I am trying to append an alphabetical counter to a string. But > concatenation shows a very strange behaviour in this case. Can some > one please help? > > The piece of code looks like : > > $self->{"log"}->debug(" In Fun

Re: Strange behaviour in accessing array element

2004-06-02 Thread Paul Johnson
On Thu, Jun 03, 2004 at 01:23:19AM +0800, Edward Wijaya wrote: > The codes below gives this result: > > ATGC > A:2 2 > T:1 1 > C:1 1 > G:2 5 > _END_ > > which I found strange, because the value for first > row of second column should be 0. > My question is how can I avoid my code >

RE: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Tim Johnson
drive mapping, I would recommend mapping it within your script if you have the same problems. -Original Message- From: Smith Jeff D [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 7:47 AM To: 'Tim Johnson'; 'Akens, Anthony'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subje

RE: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Akens, Anthony
EMAIL PROTECTED] Sent: Monday, June 30, 2003 9:47 AM To: 'Tim Johnson'; Akens, Anthony; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Strange behaviour of chdir in mapped drives On the last point, does this happen even when using the Task Scheduler utility and running the script

RE: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Smith Jeff D
D]; [EMAIL PROTECTED] Subject: RE: Strange behaviour of chdir in mapped drives Is the drive you're trying to access actually mapped for the user you're running the cgi-bin as? Remember, in windows drive mappings are a per-user thing, so while yes it will work when you run it at a co

RE: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Tim Johnson
That's exactly right. You will run into the same problem if you try running your scripts in the scheduler. -Original Message- From: Akens, Anthony [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 7:12 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Strange behavio

RE: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Akens, Anthony
ver\share Tony -Original Message- From: beginner beginner [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 8:57 AM To: [EMAIL PROTECTED] Subject: Re: Strange behaviour of chdir in mapped drives Hi, I have tried it through command line It is working When i used the same code and pu

Re: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Rob Dixon
Beginner Beginner wrote: > Hi, >I have tried it through command line It is working When i used the same code and > put the file in cgi-bin and try to run > through explorer it didn't worked > > $basedir= "I:/tech/work/web/Documents"; > chdir($basedir) or die $!; > $test=`dir /s /b *.*`; > pri

Re: Strange behaviour of chdir in mapped drives

2003-06-30 Thread beginner beginner
Hi, I have tried it through command line It is working When i used the same code and put the file in cgi-bin and try to run through explorer it didn't worked $basedir= "I:/tech/work/web/Documents"; chdir($basedir) or die $!; $test=`dir /s /b *.*`; print $test; If I simply replace I: with D:

Re: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Jenda Krynicky
From: "Rob Dixon" <[EMAIL PROTECTED]> > Beginner Beginner wrote: > > Hi All, > > I wanted to search for *.html file on Server which I can > > mount in my Windows XP: > > e.g. I drive mapped to tech\work\web\documents. > > as I:\tech\work\web\documents > > now i try to go inside this

Re: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Rob Dixon
Beginner Beginner wrote: > Hi All, > I wanted to search for *.html file on Server which I can mount in my Windows > XP: > e.g. I drive mapped to tech\work\web\documents. > as I:\tech\work\web\documents > now i try to go inside this directory > as > $basedir="I:/tech/work/web/documents"; >

RE: Strange behaviour

2002-11-08 Thread david
Jessee Parker wrote: > Honestly I'm stuck. If I kill the process after it does it's job, I'm > thinking that there is no residual from the previous program. When I do > a ps -A there is only 1 program left to kill after it finishes > processing. I kill this process and run my script. Whenever the

RE: Strange behaviour

2002-11-08 Thread Jessee Parker
2 5:26 PM To: [EMAIL PROTECTED] Subject: Re: Strange behaviour Jessee Parker wrote: > I am currently running this on Redhat Linux version 7.3 and using Perl > version 5.8.0. I've tried different things - let the process run and > process multiple batches of files and I have killed it wit

Re: Strange behaviour

2002-11-07 Thread david
Jessee Parker wrote: > I am currently running this on Redhat Linux version 7.3 and using Perl > version 5.8.0. I've tried different things - let the process run and > process multiple batches of files and I have killed it with kill -9 > command on the pid and then restarted the program. First run

Re: Strange behaviour

2002-11-07 Thread Jessee Parker
that is of any help. Jessee - Original Message - From: "david" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 5:02 PM Subject: Re: Strange behaviour > Jessee Parker wrote: > > > Hi all, > > > > I have a sc

Re: Strange behaviour

2002-11-07 Thread david
Jessee Parker wrote: > Hi all, > > I have a script that basically waits for 2 files to be delivered to > it, > then it processes the 2 files, inserts them into the database and then > starts sending information. After information is sent, it deletes the > record from the database and incr