in reply to Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Modifying Perl script to write to MySQL??
in thread Modifying Perl script to write to MySQL??

You should put the while (<FILE>) { on a line by its own or else it will not be seen because of the comment prior in that line.

As to what becomes of the $guestbookreal part of the script I have no idea whatsoever. For that I would have to analyze the whole script and sadly I'm lacking in time to do so.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Modifying Perl script to write to MySQL??
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Modifying Perl script to write to MySQL??
by bobafifi (Beadle) on Feb 16, 2004 at 23:30 UTC
    That worked! !

    There's a couple of strange anomolies:

    - Date field now says "Friday, February 13, 2004"
    - "dt_update," and "dt_create" fields show nothing but zeros

    anyhow, at least NOW the ads post to MySQL (yippie!)
    (whatever's causing those other bugs, that's a different chapter...)

    Many thanks for all your help CountZero! :-)

    -Bob
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Modifying Perl script to write to MySQL??
by bobafifi (Beadle) on Feb 17, 2004 at 02:07 UTC
    >As to what becomes of the $guestbookreal part of the script I have no idea whatsoever.
    >For that I would have to analyze the whole script and sadly I'm lacking in time to do so.

    Unfortunately CountZero, I now know what the answer is! - it's what gets printed every time the script is run....
    I couldn't figure out why I kept getting the same result over and over no matter what I put in the form, and so I tried deleting that $guestbookreal=newlistings line and got a "500 Internal Server Error"

    Bingo!
    explains why the date was showing up as February 13 etc. - because that's the same INSERT string that's been on the new_listings.page since Friday - not what's going through the script!
    anyhow...

    still glad to have been shown that it's possible to connect to MySQL this way (even if it's still not working quite right yet)

    Many thanks CountZero, honestly :-)

    -Bob