Last ID of the added file

How can I get the ID of the last file I just added to files?

$data=array(
‘date’ => date(“Y-m-d”),
‘name’ => $name, );

$data2 = array( ‘%s’, ‘%s’ );

$this->wpdb->insert(‘files’, $data, $data2);

Read more here:: Last ID of the added file

Leave a Reply

Your email address will not be published. Required fields are marked *