RE: What's wrong with this code?

2002-07-29 Thread Kipp, James
you never executed the SQL statment $sth->execute(); > -Original Message- > From: Soheil Shaghaghi [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 27, 2002 2:05 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: What's wrong with this code? > >

Re: What's wrong with this code?

2002-07-27 Thread Wiggins d'Anconia
See inline comment. Soheil Shaghaghi wrote: > Hi everyone, > Can anyone please tell me what the problem is with this code? > Every time I run my program with this code in it, I get an error in the log > files: > DBD::mysql::st fetchrow_array failed: fetch() without execute() at > IWeb/sqlengine.p

What's wrong with this code?

2002-07-26 Thread Soheil Shaghaghi
Hi everyone, Can anyone please tell me what the problem is with this code? Every time I run my program with this code in it, I get an error in the log files: DBD::mysql::st fetchrow_array failed: fetch() without execute() at IWeb/sqlengine.pm line 3395. sub SQL_Is_Sponsor { my ($link_id) = @_

Re: What's wrong with this?

2002-07-01 Thread Brian
Terminology not withstanding, it's again the lexical scoping. Basically, what you're doing wrong is by declaring the scalar test inside the while block. As long as the code is exiting within the while block, $test is still alive. The code exits out of the while block and $test is no more. Also- b

Re: What's wrong with this?

2002-07-01 Thread Sp0oKeR
PROTECTED] - Original Message - From: Kyle Babich <[EMAIL PROTECTED]> To: beginners-cgi <[EMAIL PROTECTED]> Sent: Monday, July 01, 2002 1:36 PM Subject: Re: What's wrong with this? > Quer ter seu próprio endereço na Internet? > Garanta já o seu e ainda g

Re: What's wrong with this?

2002-07-01 Thread Andy Lester
> open(TEXT,"text.txt") or die ("error: text.txt failed\n"); > while () { > my $text = ; > } > > It tells me $text requires explicit package name but I do give it 'my' > so why is it still giving me that error? The $text has fallen out of scope. Lexical variables (d

Re: What's wrong with this?

2002-07-01 Thread Kyle Babich
Ok, thank you, but now I'm having another problem with this: open(TEXT,"text.txt") or die ("error: text.txt failed\n"); while () { my $text = ; } close(TEXT) or die("error: close text.txt failed\n"); print <<"EndOfHTML"; $text EndOfHTML It tells me $text requ

Re: What's wrong with this?

2002-07-01 Thread Andy Lester
>Try to use(UpperCase): > open(TEXT,"text.txt") > while() Also, if you're using Perl >= 5.6.0, use the $fh notation and get around the barewords entirely. open( my $fh, "text.txt" ) or die $!; while ( <$fh> ) { # whatever } close $fh; -- 'Andy Lester[E

Re: What's wrong with this?

2002-07-01 Thread Felix Geerinckx
on Mon, 01 Jul 2002 15:22:00 GMT, [EMAIL PROTECTED] (Kyle Babich) wrote: > open(text,"text.txt") or die ("error: text.txt failed\n"); > [...] > bash-2.05$ perl -Tcw index.pl > Unquoted string "text" may clash with future reserved word at > index.pl line 17. > [..] > How do I fix it? >From p

Re: What's wrong with this?

2002-07-01 Thread Sp0oKeR
ux / Security [EMAIL PROTECTED] - Original Message - From: Kyle Babich <[EMAIL PROTECTED]> To: beginners-cgi <[EMAIL PROTECTED]> Sent: Monday, July 01, 2002 12:22 PM Subject: What's wrong with this? > Quer ter seu próprio endereço na Internet? > G

What's wrong with this?

2002-07-01 Thread Kyle Babich
open(text,"text.txt") or die ("error: text.txt failed\n"); #line 17 while() { print $_; } close(text) or die("error: close text.txt failed\n"); #line 22 bash-2.05$ perl -Tcw index.pl Unquoted string "text" may clash