In mysql, user permissions are a deep learning. If you improperly set database permissions, the database on the entire mysql database server may be exploited, let's take a look at the mysql user and permission management settings.
1. Basic instructions for MySQL users:
1.1 Basic user StructureMySQL user: User Name @ host
■ User name: within 16 characters■ HOST: Host Name, IP address, network address, etc.Host Name: www. bKjia. c0m, localhost
IP: 192.1
workday between two dates
The simplest way to calculate the workday between two dates is a calendar table containing the dday section and the other that marks whether all the dates in a known year are off days, then the following query finds all workdays between Start and Stop.
The Code is as follows:
Copy code
Select count (*)FROM calendarWHERE d BETWEEN Start AND StopAnd dayofweek (d) not in (1, 7)AND holiday = 0;
5. unix timestamp comparison
Mysql built-in func
", but do not include "Adams" and "Carter "; some databases list people between "Adams" and "Carter" and include "Adams" and "Carter; other databases list people between "Adams" and "Carter", including "Adams", but not "Carter ".
Therefore, check how your database handles the BETWEEN... AND operator!Instance 2To use a person out of the range shown in the preceding example, use the not operator:
SELECT * FROM PersonsWHERE LastNameNot between 'adams' AND 'cart'Result set:Id LastName FirstName Addr
In mysql, You cannot delete stored procedures or functions in batches. You can delete only one stored procedure or function at a time. To delete a stored procedure or function, you must have the alter routine permission for the process or function,
Batch deletion is not allowed in the mysql tutorial.Stored Procedure or functionOnly oneStored Procedure or functionTo delete a stored procedure or function, you must have the alter routine permission for the process or function,
The mysql Stored Pr
(Data Storage table). myi (storage index table)
Ii. innodb
The auto-increment column of the innodb table, which can be manually input. However, if the value is 0 or null, the actual inserted value will automatically increase, the automatic growth of innodb tables must be set as indexes, and myisam is not required. It also supports foreign key constraints,
Iii. memory
The memery storage engine uses the content stored in the memory to create a table. Each memory table corresponds to only one hard
Mysql SQL stored procedure condition definition and processing. The condition definition and processing of the stored procedure can define the problems encountered during the processing for corresponding processing.
Definition and processing of Stored Procedure ConditionsYou can define the problems encountered during the processing and handle them accordingly.
I. condition definition
DECLARE condition_name condition for condition_vale
Condition_value:
Sqlstate [value] sqldata_value | mysql tutor
To obtain the browser version, we can not only use the server script to determine the same, but also use js to obtain the browser version information. To obtain the browser version in js, we only need to use navigator, let's take a look at the instance.
Core code
The Code is as follows:
Copy code
Var Sys = {};Var ua = navigator. userAgent. toLowerCase ();Var s;Var scan;(S = ua. match (/msie ([d.] + )/))? Sys. ie = s [1]:(S = ua. match (/firefox/([d.] + )/))? Sys. firefox
Window. navigate only supports ie browsers, while window. location. href is compatible with all browsers, so I do not know why window. navigate appears. Here I will introduce it to you.
The first note is that window. navigate and window. location. href both implement Page Link jump. The following describes their differences.
Window. navigate ("http://www.bKjia. c0m ") This method is only for IE and does not apply to Firefox and other browsers. in html
jump after login
The Code is as follows:
Copy code
(4) page redirection using php header has achieved the purpose of regular page Jump
The Code is as follows:
Copy code
/**@ Title: PHP implements timed jump@ Function: Wait for the specified time and jump to the specified page (instead of html meta)*/Header ("refresh: 3; url = http://www.bKjia. c0m ");Echo 'loading. Please wait... /*Note: If th
In oracle, the delete command starts with delete, which is the same as other SQL statements. The following describes how to delete tables, views, sequences, functions, and data in oracle.
After executing the following SQL statement, we can get the SQL statement to be executed, and then copy the SQL statement printed by these programs for execution.
-- Delete tables delete a data table
The Code is as follows:
Copy code
Select 'drop table' | table_name | ';' | chr (13) | ch
This article uses phpmyadmin as an example to show you how to configure a website under iis step by step, and then add php running permissions to the website. If you need this, refer to it.
I. Create a directory on the d: disk named phpmyadmin, and then move the file in the phpmyadmin directory to the phpmyadmin directory you just created.
2. Open internet Information Service (iis) management, right-click the website, and choose new> website.
3. perform operations based on the website cre
your own needs. For example, if you want to convert it to minutes, divide it by 60.
Instance
The code is as follows:
/*** Time difference calculation** @ Param Timestamp $ time* @ Return String Time Elapsed* @ Author Shelley Shyan* @ Copyright http://www.bKjia. c0m (Professional PHP Architecture)*/Function time2Units ($ time){$ Year = floor ($ time/60/60/24/365 );$ Time-= $ year * 60x60*24*365;$ Month = floor ($ time/6
PHP mobile phone number retrieval code (API mysql ). This article introduces the implementation of mobile phone number attribution. we can use the api interface and mysql + php to check if you need it. First, we will introduce how to use our database to check the article to introduce the implementation of mobile phone number attribution. we can use the api interface and mysql + php to check if the instance is needed.
First, we will introduce how to use your own database to query multiple mobil
Use Php CURLPOST to submit a form to log on to the instance. I have mentioned a lot about the phpcurl function to implement post data submission. next I will introduce you to submit xml and form data. For example, 1CURL uses POST to submit XML data code. I have mentioned a lot about the php curl function to implement post to submit data. next I will introduce you to submit xml and form data.
Example 1
CURL uses POST to submit XML data
The code is as follows:
$ Url = "ht
. When a browser with the Alexa Toolbar is used to request a webpage, the User-Agent character will contain more alexa marks. With this feature, you can determine whether your browser has installed the ALEXA toolbar. Use PHP's $ _ SERVER ['http _ USER_AGENT '] to obtain the UA string information of the browser.The following is the code for PHP to determine whether the alexa tool is installed in your browser:
The code is as follows:
If (! Preg_match ("# Toolbar # I", $ _
In php, the form uses both POST and GET to pass parameter descriptions. In the form, we have a method attribute, which enables the form to be post and get. in php, we should use the corresponding get and post to receive it, the following describes method parameter description 1. in the form, we have a method attribute, which enables the form to be post and get. in php, we should use the corresponding get and post to receive it, the following describes the method parameters.
1. I used it before.
last page$ This-> prepg = $ this-> page-1; // the previous page is the current page minus one www. bKjia. c0m.$ This-> nextpg = $ this-> page + 1; // ($ this-> page = $ this-> lastpg )? $ This-> lastpg: ($ this-> page + 1); // the next page is the current page plus one. if the current page is the last page, the next page is 0.$ This-> firstcount = ($ this-> page-1) * $ this-> displaypg; // calculates the number of records starting with the number of
Phppdo connects to mysql to query data. Html code! Doctypehtmlpublic-w3cdtdxhtml1.0transitionalenwww.w3.orgtrxhtml1dtdxhtml1-transitional.dtdhtmlxmlnswww.w3.org1999xhtmlheadmetahtt html code
Ansys tutorial
Php code
$ Db = new sqlite3 ('MySQL tutorial itedb. db ');
// Obtain the binary stream of a file$ Filename = "/www. bKjia. c0m/logo.gif ";$ Handle = fopen ($ filename, "r ");$ Contents = fread ($ handle, filesi
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.