Query int

Jmnote (토론 | 기여)님의 2012년 1월 2일 (월) 15:44 판 (새 문서: <source lang='php'> function intQuery($qry) { $result = mysql_query($qry); $row = mysql_fetch_array($result, MYSQL_NUM); return $row[0]; } $cnt1 = intQuery("SELECT COUNT(*) FROM t...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
function intQuery($qry) {
	$result = mysql_query($qry);
	$row = mysql_fetch_array($result, MYSQL_NUM);
	return $row[0];
}

$cnt1 = intQuery("SELECT COUNT(*) FROM table1");
$cnt2 = intQuery("SELECT COUNT(*) FROM table2 WHERE no='1'");
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}