PHPackages                             tyty16/sqldeadcolumnfinder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. tyty16/sqldeadcolumnfinder

ActiveLibrary[Database &amp; ORM](/categories/database)

tyty16/sqldeadcolumnfinder
==========================

Finds columns that are null or only have one unique value

1.0.0(9y ago)014MITPHPPHP &gt;=5.1.0

Since Aug 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/TYTY16/SQLDeadColumnFinder)[ Packagist](https://packagist.org/packages/tyty16/sqldeadcolumnfinder)[ Docs](https://github.com/TYTY16)[ RSS](/packages/tyty16-sqldeadcolumnfinder/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

SQLDeadColumnFinder
===================

[](#sqldeadcolumnfinder)

A php class designed to find "dead" columns in a SQL database (Null or only 1 unique value).

\##Installation

This library requires PHP 5.1 or later, but it is recommended to use the latest version of PHP. It does not have any other dependencies.

It can either be autoloaded and installed via Composer [tyty16/sqldeadcolumnfinder](https://packagist.org/packages/tyty16/sqldeadcolumnfinder), or can be downloaded on its own.

\##Getting Started

\###Instantiation

Instantiate the SQLDeadColumnFinder class with the pdo connection along with the name of the database you would like to check. Optional parameters include:

-**$all** (boolean value indicating whether to check all tables, or just tables with a created\_at column) default:false -**$months** (integer value for how many months prior to the created\_at date to check. Used when all is set to false) default:6 -**$file** (string value for the desired output file name) default:'dead-columns'

\####Example

```
