Xataface
2.0alpha2
Xataface Application Framework
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
actions
clear_views.php
Go to the documentation of this file.
1
<?php
2
error_reporting(E_ALL);
3
ini_set(
'display_errors'
,
'on'
);
4
class
dataface_actions_clear_views
{
5
function
handle
(&$params){
6
$res = mysql_query(
"show tables like 'dataface__view_%'"
, df_db());
7
$views = array();
8
while
( $row = mysql_fetch_row($res) ){
9
$views[] = $row[0];
10
}
11
if
( $views ) {
12
$sql =
"drop view `"
.implode(
'`,`'
, $views).
"`"
;
13
echo $sql;
14
echo
"<br/>"
;
15
$res = mysql_query(
"drop view `"
.implode(
'`,`'
, $views).
"`"
, df_db());
16
if
( !$res )
throw
new
Exception(mysql_error(df_db()));
17
}
18
echo
"done"
;
19
}
20
21
}
Generated on Fri Mar 22 2013 09:40:33 for Xataface by
1.8.1.2