Hi,
Got a a bit of a weird one in GComm :/ (v1.1.1)
This routine:
print $IN->header();
use GT::Template;
my $sth = $DB->table('comm_users')->select() || die $GT::SQL::error;
open(WRITEIT,">$CFG->{path_private}/mailshot.txt") || die qq|Cant write $CFG->{path_private}/mailshot.txt. Reason: $!|;
while (my $user = $sth->fetchrow_hashref) {
print WRITEIT GT::Template->parse_print("$CFG->{path_private}/templates/$CFG->{system_template_set}/mailshot_temp.html", $user );
}
return "DONE!";
}
...prints out what I want ion mailshot.txt on the screen, and simply just puts this in mailshot.txt:
I'm guessing the "1" is something to do with a default "true" or something in Gcomm , but I can't work out why it won't print what I want to the txt file :(
TIA for any help.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Got a a bit of a weird one in GComm :/ (v1.1.1)
This routine:
Code:
sub Make { print $IN->header();
use GT::Template;
my $sth = $DB->table('comm_users')->select() || die $GT::SQL::error;
open(WRITEIT,">$CFG->{path_private}/mailshot.txt") || die qq|Cant write $CFG->{path_private}/mailshot.txt. Reason: $!|;
while (my $user = $sth->fetchrow_hashref) {
print WRITEIT GT::Template->parse_print("$CFG->{path_private}/templates/$CFG->{system_template_set}/mailshot_temp.html", $user );
}
return "DONE!";
}
...prints out what I want ion mailshot.txt on the screen, and simply just puts this in mailshot.txt:
Code:
111111111111111111111111111111111111111111I'm guessing the "1" is something to do with a default "true" or something in Gcomm , but I can't work out why it won't print what I want to the txt file :(
TIA for any help.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!