I have php file to unfavourite certain items.
<?php
require_once __DIR__ . '/db_connect.php';
$db = new DB_CONNECT();
$UID = $_POST['UID'];
$OIDs = $_POST['OIDs'];
$query = mysql_query("UPDATE tblFavourite SET IsFavourite=0 WHERE UID='$UID'and OID IN ('$OID') ");
echo $query;
?>
in my $OIDs
value is coming as a string from my android application.
for example values are
$UID=9 and $OIDs=18,8,6,10
when am applying that value directly in IN condition it doesnt work since it needs integers.
IN condition needs (18,8,6,10) ..but all numbers are different integers not a string.
I am very new in php..any help will be appreciable.