• 使用Rss框架PHP开发流程


    1. 先在Navicat建好数据库,然后在项目文件夹model下建PHP.web文件,然后引入include_once (ROOT . '/library_Easy/mysqlhelper.php');

       

    <?php //

    include_once (ROOT . '/library_Easy/mysqlhelper.php');//固定写法

    class MessageList extends MySqlHelper {

    public function __construct() {

    parent::__construct("message_list");//和数据库一致

    }

    }

    ?>

     

    2.在项目新建文件夹text,在文件夹下建文件PHP.web

    include_once '../library_Easy/config_Self.php';

    include_once '../model/message.php';

    //StaffList::IsLogin(); //判断是否登录不用打开

     

    3.增append

    $username=new MessageList();//实例化一个对象

    $username ['my_id'];//数据库id设置自增

    $username ['username']=bonly8;

    $username ['passage']=123456;

    $username->append()->submit();

     

    删除delete

    $username=new MessageList();//实例化一个对象

    $username->delete()->where('my_id=6')->submit();

     

    修改update

    $username=new MessageList();//实例化一个对象

    $username['password']=334456;//将id=6的数据修改password这一列的值为334456

    $username->update()->where('my_id=6')->submit();

     

    查询

    $username=new MessageList();//实例化一个对象

    $username->select ()->where('my_id=6')->get_first_rows ();

    echo $username['username'];//输出

     

    按照升序输出

    $username=new MessageList();//实例化一个对象

    $username->select()->get_page_asc('my_id');//按照升序输出

    <?php

    while($username->for_in_rows()){

    echo $username['my_id'];

    echo $username['username'];

    echo $username['password'];

    ?>

  • 相关阅读:
    URAL1966 Cipher Message 3
    hdu5307 He is Flying
    UVA12633 Super Rooks on Chessboard
    spoj-TSUM Triple Sums
    bzoj3160 万径人踪灭
    bzoj2194 快速傅立叶之二
    FFT NTT 模板
    NOI2009 植物大战僵尸
    最长k可重线段集问题
    最长k可重区间集问题
  • 原文地址:https://www.cnblogs.com/bonly-ge/p/7072017.html
Copyright © 2020-2023  润新知