1
如何从看起来像这样一个数据库只跟踪管理员量:我如何将能够跟踪管理SQL
table: users
username title
Glenn Administrator
Peter New Member
我只想跟踪数据库管理员的数量。这是我正在使用的代码,但我认为它缺少一些代码。这里是代码:
// Count number of users
$result = mysql_query("SELECT title FROM users WHERE Administrator");
$users_count = mysql_num_rows($result);
// Display the results
echo $users_count;
我认为WHERE是假设是错误的。我如何只跟踪表是用户且行是标题的管理员的数量?
因此,我们必须在回答了copypasta现在呢? –
Copypasta?你什么意思?这是对问题的正确答案... – ajtrichards
加上“请不要使用mysql函数”copypasta ... [tag:php]和[tag:mysql]中的每个问题都有它的地方... –