Fining order by duplicate IP address - Like to know how many orders came from the same IP.
I'm trying to get all duplicate IP and display all orders that are coming from the same IP address.
the code below is the one I'm using but is not doing the trick I get an error
Code: Select all
public function duplicates($ip){
$query = $this->db->query("SELECT ip FROM " . DB_PREFIX . "order WHERE ip = '".$this->db->escape($ip)."'");
return $query->num_rows;
}
Code: Select all
var_dump($ip);
I only need to display the last 1 to 5 orders from the same IP address that's all.
can anyone help me in solving the problem - I'm not good on db query LOL.
let me know any advice - this is for order list
Opencart 3.0.2.0
Thank you
everyone!