Question: I'm looking for is to update data from table attendance which is LEFT INNER with table employees. So I used this query 1 UPDATE attendance

I'm looking for is to update data from table attendance which is LEFT INNER with table employees. So I used this query

1

UPDATE attendance att LEFT JOIN employees emp ON(att.employee_id = emp.id) SET date = '2018-04-27', time = '08:00:00', description = 'Sick' WHERE att.id = 1

I have two tables one is employees and other is attendance. employees table has fields as (id, employee_id, firstname, lastname, address, email, salary, creacted_on) and attendance table has fields as (id, employee_id, date, time, description). Here is my code. Can someone help me to fix my code.

I'm looking for is to update data from table attendance which is

LEFT INNER with table employees. So I used this query 1 UPDATE attendance att LEFT JOIN employees emp ON(att.employee_id = emp.id) SET date =

EDIT Absent
Epphp $connection = mysqli_connect("localhost", "root", "", "projecte!"); If (isset($_POST['edit_btn'])) { $id - $_POST['edit_id"]; Squery = "SELECT att.employee_id, att.date, att.time, att.description FROM attendance att LEFT JOIN employees emp ON emp.id - att.employee_id WHERE att.id ='$id'"; $result - mysqli_query($connection, $query); while ($row = mysqli_fetch_assoc($result)) 8
CANCEL

include('security.php' ); $connection - mysqli_connect("localhost", "root", "","project88"); //add attendance if(isset($_POST['add'])){ Samployae_id - $_POST['id']; $date - $_POST['date']; stine = $_POST["time']; Sdate = $_POST["description']; $query = "SELECT *, attendance.id AS caid, employees. employee_id AS enpid FROM attendance LEFT JOIN employees on employees.id=allendarice.employee_id WHERE aLLendance.id = '$employee_id": $query_run - mysqli_query($connection, $query); IF($query_run->nun_rows fetch_assoc(); Senplayer_id - Srow['id']; $query - "INSERT INTO attendance (date, tine, description) VALUES ('Sdate', $tima, Sdascription')"; $query_run - mysqli_query($connection, $query); $_SESSION['status'] = 'advance added successfully"; $_SESSION[ 'status_code'] = "success"; } } elset $_SESSION['error'] - 'Fill up add form first'; header('location: attendance.php'); K?php $connection = mysqli_connect("localhost", "rool", ** "projectes"); $query - "SELECT att.enployea_id, att.data, att.tine, att.description FROM attendance att INNER JOIN Employees and CN emp.id - att.employee_id WHERE att.id - 'sid''; $query_run = mysqli_query($connection, $query);

cth>Delete B) { while ($row = mysqli_fetch_assoc($query_r'un)) { strs
Date Employee ID Nane Tinth Description Edit
">

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!