I keep getting the error: Conversion failed when converting the varchar value ' BUY0' to data type int, I am unsure what the issue with my code is. the column type for cd_tp_1_item_no is varchar(30)
$customers = array("4470","3650","4322");
foreach($customers as $customer){
$sql = "SELECT DISTINCT cd_tp_1_item_no FROM oeprcfil_sql where cd_tp_1_cust_no = $customer";
$result = odbc_exec($conn,$sql);
$item[] = "";
while ($row = odbc_fetch_array($result)) {
$item = $row['cd_tp_1_item_no'];
}
}