@@ 197-225 (lines=29) @@ | ||
194 | * |
|
195 | * @return string |
|
196 | */ |
|
197 | public function report() |
|
198 | { |
|
199 | $commands = array('create', 'insert', 'alter', 'drop'); |
|
200 | $content = '<ul class="log">'; |
|
201 | foreach ($commands as $cmd) { |
|
202 | if (!@empty($this->s_tables[$cmd])) { |
|
203 | foreach ($this->s_tables[$cmd] as $key => $val) { |
|
204 | $content .= '<li class="success">'; |
|
205 | $content .= ($cmd !== 'insert') |
|
206 | ? sprintf($this->successStrings[$cmd], $key) |
|
207 | : sprintf($this->successStrings[$cmd], $val, $key); |
|
208 | $content .= "</li>\n"; |
|
209 | } |
|
210 | } |
|
211 | } |
|
212 | foreach ($commands as $cmd) { |
|
213 | if (!@empty($this->f_tables[$cmd])) { |
|
214 | foreach ($this->f_tables[$cmd] as $key => $val) { |
|
215 | $content .= '<li class="failure">'; |
|
216 | $content .= ($cmd !== 'insert') |
|
217 | ? sprintf($this->failureStrings[$cmd], $key) |
|
218 | : sprintf($this->failureStrings[$cmd], $val, $key); |
|
219 | $content .= "</li>\n"; |
|
220 | } |
|
221 | } |
|
222 | } |
|
223 | $content .= '</ul>'; |
|
224 | return $content; |
|
225 | } |
|
226 | ||
227 | /** |
|
228 | * runs a query |
@@ 143-167 (lines=25) @@ | ||
140 | ); |
|
141 | ||
142 | ||
143 | function report() |
|
144 | { |
|
145 | $commands = array( 'create', 'insert', 'alter', 'drop' ); |
|
146 | $content = '<ul class="log">'; |
|
147 | foreach ($commands as $cmd) { |
|
148 | if (!@empty($this->s_tables[$cmd])) { |
|
149 | foreach ($this->s_tables[$cmd] as $key => $val) { |
|
150 | $content .= '<li class="success">'; |
|
151 | $content .= ($cmd != 'insert') ? sprintf($this->successStrings[$cmd], $key) : sprintf($this->successStrings[$cmd], $val, $key); |
|
152 | $content .= "</li>\n"; |
|
153 | } |
|
154 | } |
|
155 | } |
|
156 | foreach ($commands as $cmd) { |
|
157 | if (!@empty( $this->f_tables[$cmd])) { |
|
158 | foreach ($this->f_tables[$cmd] as $key => $val) { |
|
159 | $content .= '<li class="failure">'; |
|
160 | $content .= ($cmd != 'insert') ? sprintf($this->failureStrings[$cmd], $key) : sprintf($this->failureStrings[$cmd], $val, $key); |
|
161 | $content .= "</li>\n"; |
|
162 | } |
|
163 | } |
|
164 | } |
|
165 | $content .= '</ul>'; |
|
166 | return $content; |
|
167 | } |
|
168 | ||
169 | function query($sql) |
|
170 | { |