How to get all tables list in Codeigniter 3?

How to get all tables list in Codeigniter 3?

In this post we will give you information about How to get all tables list in Codeigniter 3?. Hear we will give you detail about How to get all tables list in Codeigniter 3?And how to use it also give you demo for it if it is necessary.

It is a amazing deal with database to get all tables list using mysql query in php codeigniter 3 project. this type of task it might be required on big project. So if you require then i think you have knowledge of mysql query. here we will display add the table list using codeigniter mysql query.

We will execute mysql query like as bellow for getting list of all tables in codeigniter. let’s just see bellow query.

SHOW TABLES FROM 'database_name'

Now you simply run in your controller like this way with codeigniter.

Example:

$tables=$this->db->query("SHOW TABLES FROM 'codeig'")->result_array();

foreach($tables as $key => $val) {

echo $val['Tables_in_codeig']."
";

}

Output:

Also see:How to create dynamic Highcharts in Codeigniter 3?

demo_click

demo_viewer

events

item

items

I hope it can help you….

Hope this code and post will helped you for implement How to get all tables list in Codeigniter 3?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

42  +    =  52

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US