Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Back-end Suggestion in PhP
- --------------------------------------
- <form action="file_name.php" method="post" enctype="multipart/form-data">
- </form>
- Note : "enctype" use for file upload control.
- --------------------------------------
- perfect view for array
- --------------------------------------
- echo "<pre>";
- print_r($_REQUEST);
- echo "</pre>";
- --------------------------------------
- DataTable
- --------------------------------------
- https://webdamn.com/datatables-add-edit-delete-with-ajax-php-mysql/
- --------------------------------------
- SELECT (SELECT GROUP_CONCAT(" ",name) FROM tbl_course WHERE FIND_IN_SET(id,study_id)) FROM tbl_users
- Sub-Query in MySql Without Joins
- SELECT name, description, status, (SELECT username from tbl_users where id=created_by) FROM tbl_projects
- --------------------------------------
- $result = mysqli_query($conn, $query);
- foreach($result as $row)
- {
- echo $row['first_name'];
- }
- "UPDATE tbl_tasks_times SET end_time = '$stop_time', total_time =(SELECT TIMEDIFF('$stop_time',start_time)) WHERE task_id = '$id'";
- SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(TIME_FORMAT(total_time,'%H:%i:%s')))) FROM tbl_tasks_times WHERE task_id = $id;
- $task_calc = "SELECT total_time FROM tbl_tasks WHERE id = $id";
- $task_result = mysqli_query($conn, $task_calc);
- $task_time = mysqli_fetch_array($task_result, MYSQLI_BOTH);
- echo $task_time['total_time'];
- $data = array(
- 'task_id'=>$task_id,
- 'start_time'=>$task_id,
- 'end_time'=>$task_id,
- 'total_time'=>$task_id
- );
- $this->db->insert('tbl_tasks_times',$data);
- $data = array(
- 'task_id'=>$task_id,
- 'start_time'=>$task_id,
- 'end_time'=>$task_id,
- 'total_time'=>$task_id
- );
- $this->db->where('task_id', $task_id);
- $this->db->update('tbl_tasks_times',$data);
- //Table Row 10 Recrod in One Row
- if($i % 10==0)
- {
- echo '</tr><tr>';
- }
Add Comment
Please, Sign In to add comment