我正在使用 PHP 和 MySQL 数据库。
$con=mysql_connect("localhost","XYZ","pqr") or die("Failed to connect with database!!!!");
mysql_select_db("LMN", $con);
//Code and SQL query to find out the User transactions count of all types from beginning till today's date
$sql =" SELECT COUNT(*) `carried out`, SUM(transaction_status = 'success') `success`, ";
$sql .=" SUM(transaction_status = 'inprocess') `inprocess`, SUM(transaction_status = 'fail') `fail`, ";
$sql .=" SUM(transaction_status = 'cancelled') `cancelled` FROM OCN.user_transaction ";
$result = mysql_query($con,$sql);
echo $result; die;
$r = mysql_fetch_array($result);
如果我要去echo $result
然后出现空白屏幕。我不明白这段代码有什么问题?任何人都可以帮助我识别错误吗?