示例#1
0
<?php

require_once '../tool/openSql.class.php';
$sql = new SQL();
$select_studing = $sql->sqlDql('select * from studing');
while ($a = mysql_fetch_array($select_studing)) {
    $b = array();
    $b['id'] = $a['id'];
    $b['name'] = $a['dataName'];
    $b['content'] = $a['dataContent'];
    echo '<div class="operate_data" data-id=' . $b['id'] . ' data-name=' . $b['name'] . ' data-content=' . $b['content'] . '></div>';
}
mysql_close();
?>
	

<div class='container'>
	
	<header class='navbar navbar-default'>
		
		<ul class='navbar-nav nav'>
			<li>
				<a class='navbar-brand' href='javascript:void(0);'>sySteam</a>
			</li>
		</ul>
		
		<ul class='navbar-nav nav'>
			<li ng-class='{active:bill.currentModel==0}' ng-click='bill.selectTypeStyle(0)'>
				<a href='javascript:void(0);'>RemoveData</a>
			</li>
			<li ng-class='{active:bill.currentModel==1}' ng-click='bill.selectTypeStyle(1)'>
示例#2
0
$search_arr = explode(',', $searchArea);
if (count($search_arr) == 1) {
    $search_table = $sql->sqlDivisionTable($searchArea);
} else {
    // 非一张表的情况下
    $search_table = array();
    foreach ($search_arr as $value) {
        $search_item = $sql->sqlDivisionTable($value);
        array_push($search_table, $search_item);
    }
}
// 表之间并没有任何关联 不能使用多表连接查询
$backArr = array();
for ($i = 0; $i < count($search_table); $i++) {
    $search_dataTable = "select id,dataName,dataContent,dataDate,dataType from {$search_table[$i]} where dataName like '%{$searchValue}%' or dataContent like '%{$searchValue}%'";
    $fetch = $sql->sqlDql($search_dataTable);
    if (mysql_affected_rows() != -1) {
        while ($b = mysql_fetch_array($fetch)) {
            $a = array();
            $a['id'] = $b['id'];
            $a['name'] = $b['dataName'];
            $a['content'] = $b['dataContent'];
            $a['date'] = $b['dataDate'];
            $a['type'] = $b['dataType'];
            array_push($backArr, $a);
        }
    }
}
$sql->sqlClose();
$goBack = array('flag' => 1, 'data_array' => $backArr);
$goBack = json_encode($goBack);
示例#3
0
    $data_select = $_GET['data_select'];
    $data_page = $_GET['data_page'];
} else {
    die('<script>document.write("传输数据方式非法.");</script>;');
}
require_once '../tool/openSql.class.php';
$sql = new SQL();
$dataBase = $sql->sqlDivisionTable($data_select);
// 第一次 0
$data_page_start = $data_page * 30;
$statement = 'select * from ' . $dataBase . ' limit ' . "{$data_page_start},30";
$stateRows = 'select count(id) from ' . $dataBase;
if ($data_page != 0) {
    //die($statement);
}
$result = $sql->sqlDql($statement);
$baseRows = $sql->sqlDql($stateRows);
while ($a = mysql_fetch_row($baseRows)) {
    $base_rows = $a[0];
}
// 如果不存在数据 则 返回0
if ($base_rows == 0) {
    echo 0;
    mysql_close($link);
    return '';
}
$arr = array();
while ($a = mysql_fetch_array($result)) {
    $b = array();
    $b['id'] = $a['id'];
    $b['name'] = $a['dataName'];
示例#4
0
<?php

if (isset($_GET['data_select'])) {
    $data_select = $_GET['data_select'];
} else {
    die('<script>document.write("传输数据方式非法.");</script>;');
}
require_once '../tool/openSql.class.php';
// sql 对象
$sql = new SQL();
// 分类过滤
$dataBase = $sql->sqlDivisionTable($data_select);
// 实际操作
$sql_expressment = 'select * from ' . $dataBase;
// 返回影响数据表行数
$result = $sql->sqlDql($sql_expressment);
$rows = mysql_affected_rows();
if (!$rows > 0) {
    echo 0;
    $sql->sqlClose($link);
    return '';
}
$arr = array();
while ($a = mysql_fetch_array($result)) {
    $b = array();
    $b['id'] = $a['id'];
    $b['name'] = $a['dataName'];
    $b['content'] = $a['dataContent'];
    array_push($arr, $b);
}
$json = json_encode($arr);