내가 JSON 데이터를 수신하기 위해 쿼리에서 작동하는 구문을 찾는 데 문제가 있어요 :MySQL의 쿼리
$info ='".mysql_real_escape_string ($_GET['clientlist'])."';
$result = mysql_query("SELECT clientname FROM `cms_client` WHERE clientname ='$info' ORDER BY clientname ASC");
내 브라우저에 넣고 : 내가 얻을 http://mydomain.com/myfile.php?clientname=Redbox
빈 응답.
내가 내 쿼리를 변경할 때 : 내 브라우저에 넣고하면
//$info ='".mysql_real_escape_string ($_GET['clientlist'])."';
$result = mysql_query("SELECT clientname FROM `cms_client` WHERE clientname ='Redbox' ORDER BY clientname ASC");
: http://mydomain.com/myfile.php
데이터베이스는 "레드 박스"로 응답
누군가가 올바른 좀 도와 주 시겠어요 통사론? 다른 사람이 당신의 쿼리에 따옴표를
$info = mysql_real_escape_string ($_GET['clientlist']);
님의
는
올바른 구문? 두 번째 코드는 구문 적으로 정확합니다 (쿼리는 의미가 없습니다). 첫 번째 코드에서 인용 부호가 무엇인지 설명하십시오. – zerkms
왜 Redbox가 표시되지 않습니까? 당신은'clientname'을 디스플레이하고'clientname'이 Redbox 인 곳으로 필터링합니다. –