This is my code, I'm searching the table names which ends with keyword called '_countries'.
I'm getting a result also but I do not know how to get table name from that result.
This is the code the fetches the query result:
$sql="show tables like '%_countries'";
$result=$this->db->query($sql);
foreach ($result -> result() as $delete) {
print_r( $delete);
}
The print_r()'s result is:
stdClass Object ( [Tables_in_test (%_countries)] => news_countries )
news_countries is the result which I need.
This is how I'm trying to access the property inside the loop:
$delete->table_name;
$delete->name;
$delete->Tables_in_test;
But above codes did not give result I need.
$delete->{'Tables_in_test (%_countries)'}