tags:

views:

43

answers:

2

dear all,this is my code at xampp:

        $sql = "INSERT INTO oqc_defect ";
          $sql.= "(Problem_date,       Dept_found,          Line,         Shift,        Time_found,     Model,         Serial_number,       DIC, ";
          $sql.= "Def_class,       Reject_qty,      Symptom,        Cause,       Correction,      Corr_action_plan, ";
          $sql.= "Eff_date) ";
          $sql.= "VALUES ('";
          $sql.= $Problem_date."','".$Dept_found."','".$Line."','".$Shift."','".$Time_found."','".$Model."','".$Serial_number."','".$DIC."','";
          $sql.= $Def_class."','".$Reject_qty."','".$Symptom."','".$Cause."','".$Correction."','".$Corr_action_plan."','";
          $sql.= $Eff_date."')";

i try to submit some data to DB. At firebug show "OK 2.6ms", but after i checked my database table still empty.Is the code above not correct?

A: 

Just echo your query after the query is constructed. Now we can only guess how the query looks like.

<?php
echo $sql;
?>
Frank Heikens
response tabs empty..
klox
+2  A: 

tried this ?

$res = mysql_query($sql) or die(mysql_error());
Raz