CodeIgniter Forums
about codeigniter3 list_tables() - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: about codeigniter3 list_tables() (/showthread.php?tid=63564)



about codeigniter3 list_tables() - sheng - 11-13-2015

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


RE: about codeigniter3 list_tables() - sheng - 11-13-2015

(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.'%\' '); 



RE: about codeigniter3 list_tables() - InsiteFX - 11-14-2015

Try this:

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



RE: about codeigniter3 list_tables() - sheng - 11-14-2015

(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_*  ?