The Wakaba and Kareha support thread, part 2 (1000)

294 Name: Anonymous : 2008-06-06 04:12 ID:eho4jHIG [Del]

	if($parent) { build_thread_cache($parent); }
else # must find out what our new thread number is
{
if($filename)
{
$sth=$dbh->prepare("SELECT num FROM ".SQL_TABLE." WHERE image=?;") or make_error(S_SQLFAIL);
$sth->execute($filename) or make_error(S_SQLFAIL);
}
else
{
$sth=$dbh->prepare("SELECT num FROM ".SQL_TABLE." WHERE timestamp=? AND comment=?;") or make_error(S_SQLFAIL);
$sth->execute($time,$comment) or make_error(S_SQLFAIL);
}
my $num=($sth->fetchrow_array())[0];

if($num)
{
build_thread_cache($num);
}
}

is what I used as a base for it. I'm not very good at Perl, so I'm just happy it works.

This thread has been closed. You cannot post in this thread any longer.