Just a small piece of code to get the ID of the latest purchase in wp e-commerce:
global $wpdb; $sql = "SELECT id FROM `".$wpdb->prefix."wpsc_purchase_logs` ORDER BY id DESC LIMIT 1"; $latest_purchase_id = $wpdb->get_var($sql);
I hope it will be useful to anybody else…
Just a small piece of code to get the ID of the latest purchase in wp e-commerce:
global $wpdb; $sql = "SELECT id FROM `".$wpdb->prefix."wpsc_purchase_logs` ORDER BY id DESC LIMIT 1"; $latest_purchase_id = $wpdb->get_var($sql);
I hope it will be useful to anybody else…
Can you clean this code for me? It’s not working like this
Is cleaned, thanks for the hint.