classes/database/mysql.php
/**
	 * Show all tables in database that optionally match $like
	 * 
	 * @param string $like the name of the table to search for
	 */
Show all tables in database that optionally match $like

@param string $like the name of the table to search for
Show all tables in database that optionally match $like @param string $like the name of the table to search for
public function list_tables($like = NULL)
	{
		$sql = 'SHOW TABLES'. ($like ? ' LIKE ?' : '');
		if( ! $results = $this->fetch($sql, array('%'. $like. '%'), FALSE))
		{
			return array();
		}
		$tables = array();
		foreach($results as $table)
		{
			$tables[] = current($table);
		}
		return $tables;
	}
public function list_tables ( $ like = NULL ) { $ sql = 'SHOW TABLES' . ( $ like ? ' LIKE ?' : '' ) ; if ( ! $ results = $ this -> fetch ( $ sql , array ( '%' . $ like . '%' ) , FALSE ) ) { return array ( ) ; } $ tables = array ( ) ; foreach ( $ results as $ table ) { $ tables [ ] = current ( $ table ) ; } return $ tables ; }
Show all tables in database that optionally match $like
Show all tables in database that optionally match $like
// Create the SQL //$like can have wild cards like "%value%" //For each result we added it to the array