私は複数のフィールドに対してmysqlクエリをコーディングしましたが、結果はすべてのフィールドに一致する必要があります。以下は、私のコードは、検索クエリが機能しない
SELECT e.es_id, e.es_sex, e.service_type, e.working_name, d.es_age, d.es_city, d.es_regional_city
FROM escorts AS e
INNER JOIN escorts_details AS d ON e.es_id = d.es_id
WHERE es_sex LIKE '%" . $es_sex . "%'
AND category LIKE '%" . $category ."%'
AND es_city LIKE '%" . $es_city ."%'
AND es_regional_city LIKE '%" . $es_regional_city ."%'";
であると私はすべてのフィールド..
SELECT e.es_id, e.es_sex, e.service_type, e.working_name, d.es_age, d.es_city, d.es_regional_city
FROM escorts AS e
INNER JOIN escorts_details AS d
ON e.es_id = d.es_id
WHERE es_sex LIKE '%male%'
AND category LIKE '%waitresses%'
AND es_city LIKE '%7%'
AND es_regional_city LIKE '%%'
あなたがexcutedクエリが表示されます場合は、そのはまだ、女性の詳細を示すを充填した後、このコードを実行するmのとき、私は満たされています"男性"(es_sex LIKE '%男性%')。
私は何が間違っているのか分かりません。
私を助けてください。
ありがとうございました。
'female'はLIKE'%male% 'です。 'es_sex = 'male''を試してください – AbraCadaver
AbraCadaver @その働きに感謝します。 – Arvind