Hi...
I start with DB first
var $member_table = "member_log";
-consist of lid,Uid,action,ctime,ldesc,ip
var $member_info_table = "member_info";
-consist of member_id,name,location
where (Uid=member_id)
The Code Currently querying only member_table
Question....i need to retrieve also some data from member_info_table....which is location.So i need only JOIN query only n how should do it in this line? :PHP Code:function search_Log_Query() {
$use_where_stmt = false;
$this->strQuery = " Select action, ldesc, ctime , ip FROM " . $this->member_table ."" ;
if (strlen($this->l_desc) != 0){
if ($use_where_stmt) {
$this->strQuery .= " and ";
} else {
$this->strQuery .= " WHERE " ;
$use_where_stmt = true ;
}
$this->strQuery .= " ldesc like '%" . $this->l_desc . "%'";
$use_where_stmt = true ;
}
}
PHP Code:$use_where_stmt = false;
$this->strQuery = " Select action, ldesc, ctime , ip FROM " . $this->member_table ."" ;
Regards
Poyor7



Reply With Quote
Bookmarks