[eluser]kurucu[/eluser]
Well... that's quite clearly true. How I missed the second part of your function is beyond me, but I only saw the following... whoops!
Code:
Select MSOSAG from itlib.WARFILE00 where WARCOD# =’”.$socode.”’
I've triple-read your function (the one I missed before) and can't fault it. I guess it's worth checking the value of $socode, for sanity, and perhaps temporarily using
Code:
function retrieve_aecode($socode)
{
return 5;
}
just to be sure the error isn't somewhere else in your app.