访问错误:运行时错误2113

时间:2017-01-30 21:37:22

标签: access

我收到此运行时错误'2113:您输入的值对此字段无效。输入地址,出生日期和PHONE#string后,它停止工作?

   $sql1 = "SELECT * FROM encode";
    $results = mysqli_query($con,$sql1);
    while($rows = mysqli_fetch_array($results)){
      $term = $rows['term'];
      $enddate = $rows['enddate'];
      $startdate = $rows['startdate'];
    }
   $today = date("Y-m-d"); 
   if(mysqli_num_rows($results) == 0){
               $output .= '<tr>
                <td>'.$row['lastname'].'</td>
                <td>'.$row['firstname'].'</td> 
                <td>'.$row['middlename'].'</td>
                <td class="prelim" data-id1="'.$row['grade_id'].'" >'.$row['prelim_grade'].'</td>
                <td class="midterm" data-id2="'.$row['grade_id'].'" >'.$row['midterm_grade'].'</td>
                <td class="finals" data-id3="'.$row['grade_id'].'" >'.$row['finals_grade'].'</td>
                <td class="final" data-id4="'.$row['grade_id'].'" >'.$row['final_grade'].'</td>
                </tr>';

            }
            else{
                $output .= '<tr>
                <td>'.$row['lastname'].'</td>
                <td>'.$row['firstname'].'</td>
                <td>'.$row['middlename'].'</td>';
                if($term == "Prelim" && $enddate <= $today && $startdate >= $today){
                $output .= '<td class="prelim" data-id1="'.$row['grade_id'].'" contenteditable>'.$row['prelim_grade'].'</td>';
                }
                else{
                $output .= '<td class="prelim" data-id1="'.$row['grade_id'].'">'.$row['prelim_grade'].'</td>';
                }
                if($term == "Midterm" && $enddate <= $today && $startdate >= $today){
                $output .= '<td class="midterm" data-id2="'.$row['grade_id'].'" contenteditable>'.$row['midterm_grade'].'</td>';
                }
                else{
                  $output .= '<td class="midterm" data-id2="'.$row['grade_id'].'">'.$row['midterm_grade'].'</td>';
                }
                if($term == "Finals" && $enddate <= $today && $startdate >= $today){
                  $output .= '<td class="finals" data-id3="'.$row['grade_id'].'" contenteditable>'.$row['finals_grade'].'</td>';
                }
                else{
                  $output .= '<td class="finals" data-id3="'.$row['grade_id'].'">'.$row['finals_grade'].'</td>';
                }
                if($term == "Final Grade" && $enddate <= $today && $startdate >= $today){
                  $output .= ' <td class="final" data-id4="'.$row['grade_id'].'" contenteditable>'.$row['final_grade'].'</td>';
                }
                else{
                  $output .= ' <td class="final" data-id4="'.$row['grade_id'].'">'.$row['final_grade'].'</td>';
                }
              $output .=' </tr>';
            }

0 个答案:

没有答案