1 | <?php |
||
36 | trait MySQLiByDanielGPstructures |
||
37 | { |
||
38 | |||
39 | use MySQLiByDanielGP, |
||
40 | MySQLiByDanielGPqueries; |
||
41 | |||
42 | /** |
||
43 | * Ensures table has special quoes and DOT as final char |
||
44 | * (if not empty, of course) |
||
45 | * |
||
46 | * @param string $referenceTable |
||
47 | * @return string |
||
48 | */ |
||
49 | private function correctTableWithQuotesAsFieldPrefix($referenceTable) |
||
56 | |||
57 | /** |
||
58 | * Returns given value for a field from REQUEST global variable |
||
59 | * |
||
60 | * @param array $details |
||
61 | * @return string |
||
62 | */ |
||
63 | protected function getFieldValue($details) |
||
75 | |||
76 | /** |
||
77 | * Handles field value ignoring any input from the user |
||
78 | * |
||
79 | * @param array $details |
||
80 | * @return string |
||
81 | */ |
||
82 | private function getFieldValueWithoutUserInput($details) |
||
92 | |||
93 | /** |
||
94 | * Return the list of Tables from the MySQL server |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | protected function getMySQLStatistics($filterArray = null) |
||
102 | |||
103 | /** |
||
104 | * returns a list of MySQL databases |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | protected function getMySQLactiveDatabases() |
||
112 | |||
113 | /** |
||
114 | * returns a list of active MySQL engines |
||
115 | * |
||
116 | * @return array |
||
117 | */ |
||
118 | protected function getMySQLactiveEngines() |
||
122 | |||
123 | /** |
||
124 | * returns the list of all MySQL global variables |
||
125 | * |
||
126 | * @return array |
||
127 | */ |
||
128 | protected function getMySQLglobalVariables() |
||
132 | |||
133 | /** |
||
134 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
135 | * |
||
136 | * @return array |
||
137 | */ |
||
138 | protected function getMySQLlistColumns($filterArray = null) |
||
142 | |||
143 | /** |
||
144 | * returns a list of MySQL databases (w. choice of exclude/include the system ones) |
||
145 | * |
||
146 | * @return array |
||
147 | */ |
||
148 | protected function getMySQLlistDatabases($excludeSystemDbs = true) |
||
152 | |||
153 | /** |
||
154 | * returns a list of MySQL engines (w. choice of return only the active ones) |
||
155 | * |
||
156 | * @return array |
||
157 | */ |
||
158 | protected function getMySQLlistEngines($onlyActiveOnes = true) |
||
162 | |||
163 | /** |
||
164 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
165 | * |
||
166 | * @return array |
||
167 | */ |
||
168 | protected function getMySQLlistIndexes($filterArray = null) |
||
172 | |||
173 | /** |
||
174 | * Return various informations (from predefined list) from the MySQL server |
||
175 | * |
||
176 | * @return int|array |
||
177 | */ |
||
178 | private function getMySQLlistMultiple($returnChoice, $returnType, $additionalFeatures = null) |
||
188 | |||
189 | /** |
||
190 | * Return various informations (from predefined list) from the MySQL server |
||
191 | * |
||
192 | * @return array |
||
193 | */ |
||
194 | private function getMySQLlistMultipleFinal($returnChoice, $returnType, $additionalFeatures = null) |
||
211 | |||
212 | /** |
||
213 | * Return the list of Tables from the MySQL server |
||
214 | * |
||
215 | * @return string |
||
216 | */ |
||
217 | protected function getMySQLlistTables($filterArray = null) |
||
221 | |||
222 | /** |
||
223 | * Return the time from the MySQL server |
||
224 | * |
||
225 | * @return string |
||
226 | */ |
||
227 | protected function getMySQLserverTime() |
||
231 | |||
232 | /** |
||
233 | * Reads data from table into REQUEST super global |
||
234 | * |
||
235 | * @param string $tableName |
||
236 | * @param array $filtersArray |
||
237 | */ |
||
238 | protected function getRowDataFromTable($tableName, $filtersArray) |
||
250 | |||
251 | /** |
||
252 | * Builds an filter string from pair of key and value, where value is array |
||
253 | * |
||
254 | * @param string $key |
||
255 | * @param array $value |
||
256 | * @param string $referenceTable |
||
257 | * @return string |
||
258 | */ |
||
259 | private function setArrayLineArrayToFilter($key, $value, $referenceTable) |
||
268 | |||
269 | /** |
||
270 | * Builds an filter string from pair of key and value, none array |
||
271 | * |
||
272 | * @param string $key |
||
273 | * @param int|float|string $value |
||
274 | * @return string |
||
275 | */ |
||
276 | private function setArrayLineToFilter($key, $value) |
||
284 | |||
285 | /** |
||
286 | * Transforms an array into usable filters |
||
287 | * |
||
288 | * @param array $entryArray |
||
289 | * @param string $referenceTable |
||
290 | * @return array |
||
291 | */ |
||
292 | private function setArrayToFilterValues($entryArray, $referenceTable = '') |
||
305 | } |
||
306 |