【发布时间】:2011-09-30 23:48:25
【问题描述】:
我正在使用 MySQL 和 PHP,我需要做这样的事情(伪代码):
if (sql row exists where username='bob')
{
// do this stuff
}
【问题讨论】:
-
您使用的是什么数据库驱动程序?
-
参见 PHP 手册示例 #1 of mysql_fetch_assoc
-
这能回答你的问题吗? How to check if a row exists in MySQL?
标签: php sql database if-statement