정보 테이블 마녀에는 웹 페이지의 설정이 한 행에 포함되어 있습니다.mysql을 사용하여 단 하나의 컬럼 값을 얻는 방법은 무엇입니까?
INFO
id
np (number of posts in one page)
ngbp (number of guestbook posts in one page)
title (title (header h1) of the website)
footer (text of the footer(copyright))
lat (latitude for the google maps)
lng (longitude for the google maps)
mail (email of the contact page)
게시물 수를 얻는 가장 좋은 방법은 무엇입니까? 데이터베이스의 한 행에서만 가치를 얻으려고 결말을 짓지 않았습니다.
$sql="SELECT np FROM info WHERE id=".$id;
$result=mysql_query($sql);
while ($row = mysql_fetch_assoc($result))
$numberofposts=$row['np'];
내가 WHERE id=1
이것을 사용해야 :
난 항상이 사용? 또는 해당 열의 가치를 얻는 가장 좋은 방법은 무엇입니까?