November 16 2022

discuz code

discuz code

the diskuz method

Registration method

runlog()

Support for SQL statement format
expression data processing
%t	DB::table()
%d	intval()
%s	addslashes
%n in(1,2,3)
%f sprintf('%f', $var)
%i do nothing
Method name:
DB::insert()

Explanation of the parameter:
$ table: the table where the data is inserted
$ dаta: inserted data, the value of the field corresponding to
$return_insert_id: whether to return the ID of the inserted data
$ replace: whether to use replacement in, when there is data that cannot be repeated in the table, replace in is equivalent to updating
$silent: do not request if the operation failed
example:
DB :: insert ('test_db', array ('name' => 'Zhang San'), true);
Method name:
DB::delete()

Explanation of the parameter:
$ table: table for deleting data
$ condition: delete condition
$limit: delete the number of records that meet the conditions
$ unbuffered: whether to use a query without caching
example:
DB::delete('test_db','id > 5',2);
Method name:
DB::update()

Explanation of the parameter:
$ table: table for updating data
$ dаta: updated data, corresponding field value
$ condition: update condition
$ unbuffered: whether to use a request without caching
$ low_priority: whether to use table update without locking
example:
DB::update('test_db',array('name'=>'lisi'),'id=4');
Method name:
DB::fetch_first()

Explanation of the parameter:
$ sql: SQL statement to query data
$ary: bind request parameters
$ silent: do not request if the request is not executed
example:
DB::fetch_first('SELECT * FROM %t where id > %d', array('test_db',$id) );
Method name:
DB::fetch_all()

Explanation of the parameter:
Get everything
$ sql: SQL statement to query data
$ary: bind request parameters
$keyfield: the name of the one-dimensional index field, and the value of the request ID is treated as a one-dimensional index.
$ silent: whether to output a request when a request fails
example:
$data = DB::fetch_all('SELECT * FROM %t where id > %d',array('test_db',$id),'id');
Method name:
DB::result_first()

Explanation of the parameter:
Get one line
$ sql: SQL statement to query data
$ary: bind request parameters
$ silent: do not request if the request is not executed
example:
$data = DB::result_first('SELECT * FROM %t where id > %d',array('test_db',$id));
Method name:
DB::query()

Explanation of the parameter:
$ sql: custom SQL statement
$ary: bind request parameters
$ silent: do not request if the request is not executed
$unbuffered: whether to use a request without caching
example:
$data = DB::query('SELECT * FROM %t where id > %d',array('test_db',$id));
Method name:
DB::num_rows()

Explanation of the parameter:
Get the number of rows
$ resourceid: resource
$ row: the first field of the specified row
example:
$data = DB::num_rows($res);
Method name:
DB::free_result()

Explanation of the parameter:
Release resources
$ resourceid: resource
example:
$data = DB::free_result($res);
Method name:
DB:: order()

Explanation of the parameter:
Sort
$ field: sorted field
$type: positive order, reverse order
example:
$data = DB:: order('id','asc');
Method name:
DB::limit()

Parameter explanation:
Setting the range of values
$ start: the value of the initial index
$limit: number of records
example:
$data = DB::limit('8','5');
Method name:
DB::implode==()==

Explanation of the parameter:
Merging fields
$ array: an array of characters to be glued together
$ glue: a string of fields splice
example:
$data = DB::implode('8',',');
Method name:
DB::field()

Explanation of the parameter:
Setting up Field data
$ field: name of the field being processed.
$ val: field value
$ glue: connection field type and value
example:
$data = DB::field('id','5','=');
$data = DB::field('id', array('1','2','3'), 'in');






Information

Visitors who are in the group Guests they can't download files.
Log in to the site under your login and password or if you are a new user go through the process registrations on the website.

Comments:

This publication has no comments yet. You can be the first!

Information the publication:

  • Author of the publication: zews
  • Date of publication: 16 November 2022 13:11
  • Publication category(s): Discuz! script / Modules Discuz!
  • Number of views of the publication: 141
  • Number of comments to the publication: 0

Related News

16 November 2022
Discuz! script / Modules Discuz!
Call the DISCUZ database

define ('apptypeid', 5); // Should, you know define ('curscript', 'userApp'); // Should, you know

Read more
16 November 2022
Discuz! script / Modules Discuz!
discuz

discuz —— , , ( ) The need for: ? ? ? discuz ? ?? Ucenter??? api????? discuz, Thinkphp32。 Ucenter , 。 discuz :

Read more
20 February 2022
Programming / Databases
SQL programming language

SQL Programming language Wikipedia A declarative programming language used to create, modify, and manage data in a

Read more
16 November 2022
Discuz! script / Modules Discuz!
Discuz! X2.5 Add a

Discuz! X2.5 Add a custom data call module (simple method) Function Discuz! The X Series Dista is still pretty

Read more
14 March 2022
Information security / Anonymity on the web
Deleting files from a

Deleting files from a computer without the possibility of recovery When you delete a file, even after deleting it

Read more

Information

Users of visitor are not allowed to comment this publication.

Site Search

Site Menu


☑ Scripts Software

Calendar

«    May 2024    »
MonTueWedThuFriSatSun
 12345
6789101112
13141516171819
20212223242526
2728293031 

Advertisement

Survey on the website

Evaluate the work of the site
 

Statistics

  • +8 Total articles 5598
  • +23 Comments 3088
  • +35 Users : 3989