這是我的代碼mysql_result無效資源
function code_exists($code){
$code = mysql_real_escape_string($code);
$code_exists = mysql_query("SELECT COUNT('url_id') FROM 'links' WHERE 'code'='$code'");
return (mysql_result($code_exists, 0) == 1) ? true : false;
}
它應該檢查數據庫,以確保$代碼是與否 ,但它不斷給我同樣的錯誤
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in
/home/codyl/public_html/projects/tests/url/func.inc.php on line 16
謝謝你,蜱似乎一直是問題:) – Cody