Category : mysqli

I want to copy the newest timestamp with data type "DATETIME" of my data to the another table each time newest data inserted Source Table (table1) : id task_id … inq_dt status 1 11111 … 2021-09-25 08:33:04 ok 2 11111 … 2021-09-25 08:35:14 ok 3 22222 … 2021-09-25 08:36:54 ok 4 11111 … 2021-09-25 08:38:34 ..

Read more

I am trying to have 3 tables Category Subcategory and CatOption Name of table: Category Columns: Id, Category Name of table: Subcategory Columns:id ,cat_id,sub Name of table:CatOption id ,sub_id,coption I created 3 drop down list who are fetching data based on ID Now I need to insert data in that tables so it can look ..

Read more

<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> </head> <title>Image Upload</title> <body> <link rel="stylesheet" type= "text/css" href ="style.css"/> <div id="content"> <form method="POST" action="" enctype="multipart/form-data"> <input type="file" name="uploadfile" value=""/> <div><button type="submit" name="upload">UPLOAD</button></div> </form> </div> </body> </html> <?php $msg = ""; // If upload button is clicked … if (isset($_POST[‘upload’])) { $filename = $_FILES["uploadfile"]["name"]; $tempname = ..

Read more

This is about Laravel query. I want get some data from db. I used below code for it, $ids = [1, 2, 3, 4, 5] $stock = $item->stocks->whereIn(‘paperorder_paper_id’, $ids)->where(‘status’, ‘qc-pass’)->get(); When simplified My problem is if id no 1 has a record it should display that value otherwise should display zero ("0"). Because I want ..

Read more