Welcome Guest, Not a member yet? Register   Sign In
about codeigniter3 list_tables()
#1

case 1 

dbprefix='keweilong_';.
$this->db->list_tables(true);
SHOW TABLES FROM `a2342343` LIKE 'keweilong!_%'
no record

if query =SHOW TABLES FROM `a2342343` LIKE 'keweilong_%'


There are records
Reply
#2

(This post was last modified: 11-13-2015, 11:37 PM by sheng.)

(11-13-2015, 10:37 PM)wolfgang1983 Wrote:
(11-13-2015, 08:25 PM)sheng Wrote: case 1 

dbprefix='keweilong_';.
$this->db->list_tables(true);
SHOW TABLES FROM `a2342343` LIKE 'keweilong!_%'
no record

if query =SHOW TABLES FROM `a2342343` LIKE 'keweilong_%'


There are records

Cannot under stand what your after question unclear to me.

I want to query the database table, prefix is keweilong_
$this->db->list_tables(true);
but no record

PHP Code:
$record=$this->db->list_tables(true); 




when i query  《SHOW TABLES FROM `a2342343` LIKE 'keweilong_%'》
have some records


PHP Code:
$record=$this->db->query('SHOW TABLES FROM `'.$this->db->database.'` LIKE \''.$this->db->dbprefix.'%\' '); 
Reply
#3

Try this:

PHP Code:
$this->db->dbprefix('keweilong');
$record=$this->db->list_tables(true); 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(11-14-2015, 05:24 AM)InsiteFX Wrote: Try this:

PHP Code:
$this->db->dbprefix('keweilong');
$record=$this->db->list_tables(true); 

if prefix=XXXX_XXX_*  ?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB