$CustomerName= preg_replace('/[^a-zA-Z0-9-_\.,& ]/','',$row["Customer_Name"]);
array_push($CustomerName2,$CustomerName);
$sqlquery = "SELECT * FROM Customer where Customer_Name IN ($CustomerName2)";
$stmt = mysql_query($conn,$sqlquery);
echo(print_r(sqlsrv_errors(), true));
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_NUMERIC))
{
$sqlCustomerIdMaps[$row[0]]= $row[0];
}
I am not well with php, in above php code querying data from sql .My output is from array $CustomerName2 like:
Array ( [0] => Acme Janitor & Chemical Supply [1] => Adam Zampa [2] => AMAZON.COM PHOENIX PHX6 [3] => Aston Agar [4] => Austin Consulting Group [5] => Brad Hodge [6] => Cedrick Johnson [7] => Crowen [8] => David Miller [9] => David Warner [10] => DKR [11] => DKR [12] => DKR [13] => Jaworskyj Gabrielle [14] => Johan2 [15] => Jone [16] => Keith Olson [17] => Mallika [18] => Manoj Reddy [19] => Michael Bevan [20] => Philip Andry [21] => Shane1 Warne1 [22] => Spad Consulting Group [23] => Usman Khawaja [24] => Zohar )
In sql query i am not getting any errors but query is not working?
I need to query with Customer_Name and add result to map to update data in sql server.
Can anybody help me to resolve this issue.
Thanks in advance!