class= "One" > class= "Both" > class= "One" > class= "Both" > class= "One" > class= "Both" > class= "One" > PHP bulk operation of the table, such as the Select all anti-select Delete function
CodeIgniter is a small but powerful PHP framework that can be used as a simple and "elegant" toolkit to build a full-featured WEB application for developers. is a more mainstream PHP framework.
Here is a description of the CI framework (Ajax paging, select all, reverse, not select, bulk Delete) complete code, the specific code is as follows:
Ajax Paging + s
The code is as follows:
Love
Operation Effect:
Select two items:
Click on the reverse selection:
Click to select All:
Delete Confirmation:
No prompts selected:
Select, update, deleteThe lock to be applied for the operation (three delete operations)
We have previously tested the lock applied for during the select and update operations.Next, let's test the delete and insert operations.Applied lock
The default isolation level for database connection in this test: Read committed
Log in to the database using the login command:shell>mysql[-h host]-uuser-p[-D database]Enterpassword-h Specifies a remote host, login local database can not use,-D is used to specify the database selected after login, if no database is specified, the database is not selected. After entering the database, there will be a mysql> prompt before each command. Commands in MySQL are strictly terminated with a semicolon (;) as a command. If a line is wrapped before a command is entered, a prompt appear
Mysql login Exit, create Delete select database, basic data type, create Delete table, mysql Login
Log on to the database and run the following logon command:
shell>mysql [-h host] -u user -p [-D database]Enter password:
-H specifies a remote host, which is not required to log on to the local database.-D specifies the database to be selected after login. If
A DB instance exists in two places in the data:1: Physical Location: On disk, which is the file system.2: Logical Location: The database system table, which is the configuration information for the disk file.Procedure for deleting a database:1: Delete the physical file, 2: Delete the logical information, that is, the configuration information of the physical file.The above two places are deleted at the same
, saddress, semail, and the ID column studentid -- and insert all the three data items in the student table into the new table. Select students. sname, students. saddress, students. semail, identity (INT, 1, 1) as studentid -- identifies the column name into tongxulu from students
-- 4: insert students (sname, sgrade, ssex) Select 'zhangke', Union select 'zhangwe
Totors table:Mysql>insert into tutors SET tname= ' Mike ', gender= ' F ', age=22;3. Insert the Tutors table with an age greater than 20 in the students table:Mysql>insert into Tutors (tname,gernder,age) SELECT nname,gender,age FORM students WHERE age>20;DELETE:DELETE from Tbname1,tbname2,... [where]| [ORDER by] | [LIMIT] Delete tableTRUNCATE Tbname clears the table and resets the auto_increment counter.Ins
This article mainly introduces Jquery's methods for adding, deleting, modifying, and querying select statements. For more information, see the following four operations: add, delete, modify, and query.
[Add]:
The code is as follows:
$ ("# Select_id"). append ("Text"); // Append an Option to Select (drop-down)$ ("# Select_id"). prepend ("
jquery operation Select (add, delete, empty)http://huapengpeng1989412.blog.163.com/blog/static/58828754201342841940720/jQuery gets the Text and Value selected by Select:
123456789
$("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发var checkText=$("#select_id").find("option:
JQuery Gets the text and value:1. Var checktext=jquery ("#select_id") selected by select. Find ("option:selected"). Text (); Gets the Select selected text 2. var checkvalue=jquery ("#select_id"). Val (); Gets the Select Option Value 3. var checkindex=jquery ("#select_id"). Get (0). SelectedIndex; Gets the index value of the
/set/map1. When deleting a node, the list pointing to the node to which the iterator fails List While (it! = Intlist. End ())
{
It = intlist. Erase (it );
......
} 4. Select the time Internal data structure: array.
Each element is randomly accessed. The time required is a constant.
The time required to add or delete an element at the end is irrelevant to the number of elements. The time required to add or
Javascript code for selecting controls (ADD, modify, delete, select, clear, and determine existence)
// 1. Determine whether the select option contains an Item with Value = "paraValue"
Function jsSelectIsExitItem (objSelect, objItemValue ){
Var isExit = false;
For (var I = 0; I If (objSelect. options [I]. value = objItemValue ){
IsExit = true;
Break;
}
}
Return
This article mainly introduces the method of Php+ajax implementation of all-select Delete, combined with the example form analysis of the HTML+JS front desk select and through the Ajax and background PHP Interactive implementation of bulk deletion of the specific procedures and related skills, the need for friends can refer to the next
Specific as follows:
↑
Please see the following interface definition:
The code is as follows
Copy Code
Database Operation interfacepublic interface Hidatabase{Find dataSystem.Data.DataSet find (String sql);Update dataint update (String sql);Add dataint add (String sql);}
It was preceded by the SQL Action statement: INSERT, SELECT, Delete, update four of these, in the previous Java version, t
item whose Value is set to 4.. $ ("# Select_id option [text = 'jquery ']"). attr ("selected", true); // Select an item whose Select Text value is set to jQuery
JQuery adds/deletes Select Option items:
Click once and Select will append an Option
Click to insert an Option at the first position of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.