skip to Main Content

How to get the most recent element by id in MySQL table using PHP – Phpmyadmin

I tried the below code to get the last inserted id so as to insert it to another table but somehow using $this->$conn->lastInsertId() doesn't seem to work. Anyone has any idea? if (!( $stmt = $this->conn->prepare("INSERT INTO company(company_name,address_line1,address_line2,postal_code,country,contact_no,email,wifi_name,website_url,contact_person,parent_id,created_by,created_date,updated_date,deleted, wifi_name2) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")))…

VIEW QUESTION
Back To Top
Search