我想回复以下事项:
这是我到目前为止所做的:
$user = 'Peter';
$myrows = $wpdb->get_row("SELECT users, date FROM yc_customers WHERE users = $user");
foreach ($myrows as $myrow) {
// Do something here
}
我感谢任何帮助。
答案 0 :(得分:0)
尝试:
$myrows = $wpdb->get_row("SELECT users, MAX(date), COUNT(*)
FROM yc_customers
WHERE users = '$user'
GROUP BY users");