Welcome Guest, Not a member yet? Register   Sign In
Query for Show Tables?
#3

[eluser]diywm[/eluser]
I had not realised the key name to the array would be something like 'Tables_in_blogdb' - thanks for pointing this out. It turns out that because I am doing a like, I have to build the key to be like this, where the like parameter forms part of the key : Tables_in_blogdb (b00043%)

$sql = "SHOW TABLES LIKE '".$tableprefix."%'";
$query = $this->query($sql);
foreach ($query->result_array() as $row){
$tablename = $row['Tables_in_blogdb ('.$tableprefix.'%)'];
echo tablename;
}


Messages In This Thread
Query for Show Tables? - by El Forum - 07-21-2010, 06:50 PM
Query for Show Tables? - by El Forum - 07-21-2010, 09:56 PM
Query for Show Tables? - by El Forum - 07-22-2010, 02:54 PM
Query for Show Tables? - by El Forum - 07-22-2010, 03:06 PM
Query for Show Tables? - by El Forum - 07-22-2010, 03:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB