sigh! The code, which isn't working is:

# if a syllabus was  attached

    if($query->param('syllabus')) {
	while($bytesread = read($query->param('syllabus'),$buffer,1024)) {
	    $syllabus .= $buffer;
	}
	$sylName = $query->param('syllabus');
	$sylName =~ s/.*\/\\(.*)/$1/;
    }
    $sql = "INSERT INTO class_info(title, instructor, inst_email, " .
           "active,max_students, description,syllabus,begin_date, " .
	   "syll_name,begin_time,class_length) VALUES('" . 
	   $query->param('title') . "','" .
	   $query->param('name') . "','" . $query->param('email') . "',1," .
	   $maxstud . ",'" . $query->param('description') . "'," .
	   $syllabus . ",'" . 
           $query->param('year0') . "-" . $query->param('mon0') . "-" .
	   $query->param('day0') . "','" . $sylName . "'," .
	   "SEC_TO_TIME(TIME_TO_SEC('" . $query->param('classtime') . "') + " .
	       $timeadj . ")," . $query->param('lengthofclass') . ")";
    $dbh->do("INSERT INTO class_info(title, instructor, inst_email, " .
           "active,max_students, description,syllabus,begin_date, " .
	   "syll_name) VALUES('" . $query->param('title') . "','" .
	   $query->param('name') . "','" . $query->param('email') . "',1," .
	   $maxstud . ",'" . $query->param('description') . "'," .
	   $syllabus . ",'" . 
           $query->param('year0') . "-" . $query->param('mon0') . "-" .
	   $query->param('day0') . "','" . $sylName . "'" .
	   "SEC_TO_TIME(TIME_TO_SEC('" . $query->param('classtime') . "') + " .
	   $timeadj . ")," . $query->param('lengthofclass') . ")";
	|| die $sql . "\n" . $dbh->errstr;

In reply to Re: DBI file input to blob by amracel
in thread DBI file input to blob by amracel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.