请问这段代码有什么问题 它应该从一个名为client的表中获取一个电子邮件地址但它什么都不返回
注意:我已正确设置连接文件
脚本可以与mysql数据库通信,因为我已经能够添加新的用户详细信息
$colname_rsClient = "1";
if (isset($_GET['email'])) {
$colname_rsClient = (get_magic_quotes_gpc()) ? $_GET['email'] : addslashes($_GET['email']);
}
mysql_select_db($database_connHotel, $connHotel);
$query_rsClient = sprintf("SELECT * FROM clients WHERE email = '%s'", $colname_rsClient);
$rsClient = mysql_query($query_rsClient, $connHotel) or die(mysql_error());
$row_rsClient = mysql_fetch_assoc($rsClient);
$totalRows_rsClient = mysql_num_rows($rsClient);
?>
<?php if ($totalRows_rsClient == 0) { // Show if recordset empty ?>
<h1 align="center">Unable to Locate Email Address</h1>