Çıkış yazmak gider ama benim tarayıcıda bulunuyor "Uyarı demek uyarıyı gösterir nedir benim kod yanlış, ben bunu test zaman: odbc_fetch_row (): 37 C geçerli bir ODBC sonuç kaynak değildir: \ xampp \ htdocs \ webinterface istekleri \. "satırında 729 php
I don't know what does it mean, the sql statement result just goes fine in dbexplorer. by the way may database is paradox and using odbc to connect my php to paradox.
Herkes bana yardımcı olabilir mi? Teşekkür ederim çok çok
benim kod aşağıda:
$connectionstring = odbc_connect(DB_DNS,DB_USER,DB_PASS);
$auditRequestNo = "";
$ar_requestno = "";
$svemp1 = "";
$svemp2 = "";
foreach($uArr as $arNo){
$ar_requestno .= (!empty($ar_requestno))? ",".$arNo : $arNo;
$auditRequestNo .= (!empty($auditRequestNo))? ",".sprintf("%08d", $arNo) : sprintf("%08d", $arNo);
}
$query = "SELECT SV_EmployeeNo,Sv_EmployeeNo2 \r\n".
"FROM AuthorizationRequests \r\n".
"WHERE ARNO IN (".$ar_requestno.") ";
$result = odbc_do($connectionstring, $query);
while(odbc_fetch_row($result)){
$svemp1 = odbc_result($result,1);
$svemp2 = odbc_result($result,2);
switch(intval($s)){
case 1: // approved
if(empty($svemp1) and empty($svemp2)){
$update_fields = "flag=0, DateApproved = { d '".date('Y-m-d')."' } , SV_EmployeeNo=".$_SESSION['uen']." ";
$update_query = "UPDATE AuthorizationRequests \r\n".
"SET ".$update_fields."\r\n ".
"WHERE ArNo IN(".$ar_requestno.")";
$update_query = odbc_exec($connectionstring, $update_query);
odbc_close($connectionstring);
}else if(!empty($svemp1) and empty($svemp2) and $svemp1 != $_SESSION['uen']){
$update_fields = "flag=".$s.", DateApproved2 = { d '".date('Y-m-d')."' } , SV_EmployeeNo2=".$_SESSION['uen']." ";
$update_query = "UPDATE AuthorizationRequests \r\n".
"SET ".$update_fields."\r\n ".
"WHERE ArNo IN(".$ar_requestno.")";
$update_query = odbc_exec($connectionstring, $update_query);
odbc_close($connectionstring);
}
#}
break;
case 2: // rejected
$update_fields = "flag=".$s.", DateApproved = { d '".date('Y-m-d')."' }, SV_EmployeeNo=".$_SESSION['uen']." ";
$update_query = "UPDATE AuthorizationRequests \r\n".
"SET ".$update_fields."\r\n ".
"WHERE ArNo IN(".$ar_requestno.")";
$update_query = odbc_exec($connectionstring, $update_query);
odbc_close($connectionstring);
break;
default: // reset
$update_fields = "flag=0, DateApproved=NULL, SV_EmployeeNo=NULL, DateApproved2=NULL, SV_EmployeeNo2=NULL";
$update_query = "UPDATE AuthorizationRequests \r\n".
"SET ".$update_fields."\r\n ".
"WHERE ArNo IN(".$ar_requestno.")";
$update_query = odbc_exec($connectionstring, $update_query);
odbc_close($connectionstring);
break;
}
}