hi..
I'll try to answer... (but sorry for my english before
)
Like CroMagnon said that it seems you have to look at the strings at your SQL statement (it needs spaces after the quotes).
## if ($merchant <> 0)
## {
## $sql=$sql . "AND MERCHANT_MASTER.MERCHANT_ID = '" .$merchant. "'";
## }
it think you should add spaces so it looks like this..
if ($merchant <> 0)
{
$sql=$sql . " AND MERCHANT_MASTER.MERCHANT_ID = '" .$merchant. "' ";
}
I hope it help..
br,
Rizal