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

case 1 

dbprefix='keweilong_';.
[font=Tahoma, Arial]$this->db->list_tables(true);[/font]
[font=Tahoma, Arial][font=Tahoma, Arial]SHOW TABLES FROM `a2342343` LIKE 'keweilong!_%'[/font][/font]
[font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial]no record[/font][/font][/font]

if query =[font=Tahoma, Arial]SHOW TABLES FROM `a[/font][font=Tahoma, Arial][font=Tahoma, Arial]2342343[/font][/font][font=Tahoma, Arial][font=Tahoma, Arial]` LIKE 'keweilong_%'[/font][/font]


[font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial]There are records[/font][/font][/font][/font][/font][/font]
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_';.
[font=Tahoma, Arial]$this->db->list_tables(true);[/font]
[font=Tahoma, Arial][font=Tahoma, Arial]SHOW TABLES FROM `a2342343` LIKE 'keweilong!_%'[/font][/font]
[font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial]no record[/font][/font][/font]

if query =[font=Tahoma, Arial]SHOW TABLES FROM `a[/font][font=Tahoma, Arial][font=Tahoma, Arial]2342343[/font][/font][font=Tahoma, Arial][font=Tahoma, Arial]` LIKE 'keweilong_%'[/font][/font]


[font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial]There are records[/font][/font][/font][/font][/font][/font]

Cannot under stand what your after question unclear to me.

[font=Tahoma, Arial]I want to query the database table, prefix is keweilong_[/font]
$this->db->list_tables(true);
but [font=Tahoma, Arial]no record[/font]

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




when i query  《[font=Tahoma, Arial][font=Tahoma, Arial]SHOW TABLES FROM `a[/font][font=Tahoma, Arial][font=Tahoma, Arial]2342343[/font][/font][font=Tahoma, Arial][font=Tahoma, Arial]` LIKE 'keweilong_%'》[/font][/font][/font]
[font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial][font=Tahoma, Arial]have some records[/font][/font][/font][/font]


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