mysql - Update table's column value and showing it at the same time (PHP) -


first of all, system working on virtual hr system. now, have profile.php page form applicant located. form consists of her/his basic profile , requires him/her set skills applicant has. when applicant press submit button, go test.php page display possible jobs applicant qualified based on skills of applicant he/she entered in profile.php.

now, i'm having error

you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'specialist fname=jamie' @ line 2 

here's code in test.php i'm trying update , show job column value in employee table.

        $last = mysql_query("select * employee ") or die(mysql_error());          echo "<table border='0' cellpadding='15' text-align = 'center' >";         echo "<tr>";              echo "<th>name</th>";             echo "</tr>";             while($row2 = mysql_fetch_array( $last )){                   $nym = $row2['fname'];               }          $result = mysql_query("select * employee t1,jobs t2                 t1.skills = t2.skills ") or die(mysql_error());          while($row = mysql_fetch_array( $result )){                 $jt = $row['jobtitle'];                 $hey = mysql_query("update employee                             set job=$jt                             fname=$nym")                             or die(mysql_error());                   echo '<th><b><font color="#663300">' . $row['job'] . '</font></b><br></th>';         } 

here's snapshot of employee database http://snag.gy/i7pw6.jpg

change query this...

 $hey = mysql_query("update employee                             set `job`='$jt'                             `fname`='$nym'")                             or die(mysql_error());  

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -