Code Duplication    Length = 12-12 lines in 3 locations

Data/class.SQLDataSet.php 3 locations

@@ 43-54 (lines=12) @@
40
        return $count;
41
    }
42
43
    function _tableExistsNoPrefix($name)
44
    {
45
        if($this->_get_row_count_for_query('SHOW TABLES LIKE '.$this->pdo->quote($name)) > 0)
46
        {
47
            return true;
48
        }
49
        else if($this->_get_row_count_for_query('SELECT * FROM sqlite_master WHERE name LIKE '.$this->pdo->quote($name)) > 0)
50
        {
51
            return true;
52
        }
53
        return false;
54
    }
55
56
    function _tableExists($name)
57
    {
@@ 56-67 (lines=12) @@
53
        return false;
54
    }
55
56
    function _tableExists($name)
57
    {
58
        if($this->_get_row_count_for_query('SHOW TABLES LIKE '.$this->pdo->quote('tbl'.$name)) > 0)
59
        {
60
            return true;
61
        }
62
        else if($this->_get_row_count_for_query('SELECT * FROM sqlite_master WHERE name LIKE '.$this->pdo->quote('tbl'.$name)) > 0)
63
        {
64
            return true;
65
        }
66
        return false;
67
    }
68
69
    function _viewExists($name)
70
    {
@@ 69-80 (lines=12) @@
66
        return false;
67
    }
68
69
    function _viewExists($name)
70
    {
71
        if($this->_get_row_count_for_query('SHOW TABLES LIKE '.$this->pdo->quote('v'.$name)) > 0)
72
        {
73
            return true;
74
        }
75
        else if($this->_get_row_count_for_query('SELECT * FROM sqlite_master WHERE name LIKE '.$this->pdo->quote('v'.$name)) > 0)
76
        {
77
            return true;
78
        }
79
        return false;
80
    }
81
82
    function tableExists($name)
83
    {