07-26-2023, 11:29 PM
whmcs inner join 'where condition',
both table having same field.
how distinguish table name in where condition ?
tried this one ,
$table = "tblclients";
$fields = "id,firstname,lastname,domain";
$where = array(
"lastname"=>array("sqltype"=>"LIKE","value"=>"Demo"),
"companyname"=>array("sqltype"=>"NEQ","value"=>""),
);
$sort = "id";
$sortorder = "ASC";
$limits = "0,5";
$join = "tblhosting ON tblhosting.userid=tblclients.id";
$result = select_query($table,$fields,$where,$sort,$sortorder,$limits,$join);
how specify table name in where condition ?
both table having same field.
how distinguish table name in where condition ?
tried this one ,
$table = "tblclients";
$fields = "id,firstname,lastname,domain";
$where = array(
"lastname"=>array("sqltype"=>"LIKE","value"=>"Demo"),
"companyname"=>array("sqltype"=>"NEQ","value"=>""),
);
$sort = "id";
$sortorder = "ASC";
$limits = "0,5";
$join = "tblhosting ON tblhosting.userid=tblclients.id";
$result = select_query($table,$fields,$where,$sort,$sortorder,$limits,$join);
how specify table name in where condition ?