phpLens
 home  products examples manual  faq support forum  contact news  login store

Forums: phplens   adodb
Forums:   PHPLens Technical Support:   Replies 
New ReplySearch
Topic: MetaTables('TABLES') doesn't works on mysql drivers
author: Vicente Salvador   created: 12-01-2012 09:15:47 AM
Show only tables (discarding views) by using MetaTables('TABLES') doesn't works on MySQL drivers.


To work just patch the files:

drivers/adodb-mysqli.inc.php
drivers/adodb-mysql.inc.php
drivers/adodb-pdo_mysql.inc.php

Replacing current metaTablesSQL definition:

var $metaTablesSQL = "SHOW TABLES";

BY:

var $metaTablesSQL = "SELECT TABLE_NAME, CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=SCHEMA()";
Topic: Re:MetaTables('TABLES') doesn't works on mysql drivers
author: Vicente Salvador   created: 16-01-2012 04:06:24 AM
Sorry, But forum, should be adodb forum. Please manager, move this thread to adodb forum.
Page 1
New ReplySearch

View Source

email: contact#phplens.com (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800