im trying to pass a url to fetch data for android JSON.
URL-адрес является: fetch_cat_url = "ххх/get_product_details.php task_name = get_cat & cat_name =" + cat_name;как передавать и получать данные при использовании амперсанд в SQL
where cat_name="Books & More"
now when i pass this url.. it goes like
xxxxx/get_product_details.php?task_name=get_cat&cat_name=Books & More
in my sql file
switch($_GET["cat_name"])
{
case "Fashion":
$sql = "SELECT * FROM `category` where c_name IN (\"Men\",\"Women\" ,\"Baby & Kids\") ";
break;
case "Home & Living":
$sql = "SELECT * FROM `category` where c_name IN (\"Kitchenware\", \"Home Furnishing\", \"Home Decoratives\", \"Furniture\") ";
break;
case "Books & More":
$sql = "SELECT * FROM `category` where c_name IN (\"Academic Text\", \"Literature & Fiction\", \"Non Fiction\", \"Self Help\", \"Children & Young Adult\", \"Competitive Exam\") ";
break;
case "Automotives":
$sql = "SELECT * FROM `category` where c_name IN (\"Car Accessories\", \"Helmets & Accessories\", \"Car & Vehical Electronics\", \"Car Freshners\", \"Spare Parts\") ";
break;
}
now for & the data is not returned in json.. but it returns for rest all categories...
возвращает данные для моды и, но не Автотранспорт для книг и дома
Читать эту статью http://sqlitebrowser.org/ – Stanojkovic