当前位置: 首页>>代码示例>>PHP>>正文


PHP Crud::read方法代码示例

本文整理汇总了PHP中Crud::read方法的典型用法代码示例。如果您正苦于以下问题:PHP Crud::read方法的具体用法?PHP Crud::read怎么用?PHP Crud::read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Crud的用法示例。


在下文中一共展示了Crud::read方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public static function run($obj, $webClass)
 {
     if ($obj instanceof Model) {
         $cmd = isset($_GET['cmd']) ? addslashes($_GET['cmd']) : 'read';
         if ($cmd == "edit") {
             Crud::createForm($obj, $webClass);
             die;
         }
         if ($cmd == "add") {
             //Crud::createForm($obj,$webClass);
             $json = Crud::addPrecon($obj);
             die(json_encode($json));
         }
         if ($cmd == "delete") {
             $json['bool'] = 1;
             $id = isset($_POST['id']) ? addslashes($_POST['id']) : '';
             $json['bool'] = $obj->delete($id);
             die(json_encode($json));
         }
         if ($cmd == "ws") {
             Crud::workWebService($obj, $webClass);
             die;
         }
         Crud::read($obj, $webClass);
     } else {
         die('Crud hanya bisa dipakai dengan object Crud');
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:martabak_revolution,代码行数:28,代码来源:Crud.php

示例2: Crud

<?php

error_reporting(E_ALL);
ob_start("ob_gzhandler");
require_once 'CrudClass.php';
$read = new Crud();
$read->read();
echo '<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Squro tree</title>
    <link rel="stylesheet" href="squro.css">
    <script type="text/javascript" src="squro.js"></script>
</head>
<body>
<h1>Squro tree</h1><ul class="node">' . $read->show . '</ul></body>
</html>';
开发者ID:gennadiy-0612,项目名称:squro,代码行数:18,代码来源:index.php

示例3: update

            echo "error:" . $sql . "<br>" . $conn->error;
        }
    }
    public function update()
    {
        $sql = " Update faqs SET answer ='woh'  WHERE id=1";
        if ($this->conn->query($sql) === TRUE) {
            echo "Record updated successfully";
        } else {
            echo "Error updating record: " . $conn->error;
        }
    }
    public function __destruct()
    {
        $this->conn->close();
    }
}
$crud = new Crud();
switch ($_GET['action']) {
    case "read":
        $crud->read();
        break;
    case "update":
        $crud->update();
        break;
    case "delete":
        break;
    case "insert":
        $crud->insert();
        break;
}
开发者ID:knguyen92990,项目名称:crud,代码行数:31,代码来源:test.php

示例4: Crud

<?php 
include_once 'model.php';
$readInstantiate = new Crud();
$getData = $readInstantiate->read();
//var_dump($getData);
if (isset($_REQUEST['del_id'])) {
    $readInstantiate->delete($_REQUEST['del_id']);
    header("location : read.php");
}
?>
<table>
	<tr>
		<td>S.No.</td>
		<td>Name</td>
		<td>Address</td>
		<td>Phone</td>
		<td>Gender</td>
	</tr>
	<?php 
$i = 1;
?>
	<?php 
foreach ($getData as $key => $value) {
    ?>
	<tr>
		<td><?php 
    echo $i++;
    ?>
</td>
		<td><?php 
开发者ID:ocpyosep78,项目名称:basicCrudInPhp,代码行数:30,代码来源:read.php


注:本文中的Crud::read方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。