:--------------------------------------------------------------------------------------------------------------| operator | Description |--------------------------------------------------------------------------------------------------------------| + | contains, words must exist| -| Excluding, words must not appear| > | contains, and increases the rating value| | () | The word composition subexpression (allows these subexpression to be included as a group, excluded, arranged, etc.)| ~ | Cancels
Array is used as the parameter of the sort function, and after sorting, the array itself is changed, and the return value of the function is bool type.
2 function name appears single A association, meaning, in the process of ordering by value, maintain the key=>value of the corresponding relationship is unchanged
3 function name in a single K represents key, meaning, in the process of sorting by value according to the array key instead of the value of the array sort
4 The expression reverse o
| * | The suffix wildcard| "|" | defines a phrase (unlike a list of individual words that matches an entire phrase to include or exclude the phrase)--------------------------------------------------------------------------------------------------------------- -
Use the following methods:
The code is as follows
Copy Code
SELECT * from articles WHERE MATCH (title,body)Against (' +apple-banana ' in BOOLEAN MODE);
+
of rows searched, the word will be searched as common word, which is not displayed. fulltext using syntax (this section links http://www.lao8.org/article_1602/MATCH_AGAINST_mysql) --find Product_name,description contains Lenovo's record SELECT * from product WHERE MATCH ( product_name,description) against (' Lenovo ')--+ denotes and, which must be included.
-Represents not, that is, not included.
SELECT * from articles WHERE MATCH (title,body) against (' +apple-
List
Lists are one of the most commonly used data types and can be easily stored, modified, and manipulated by the list.
1. Defining the list
Fruits = [' apple ', ' banana ', ' orange ']
2. Use the subscript to access the elements in the list, and the subscripts count from 0
>>> fruits[0] ' Apple ' >>> fruits[2] ' orange ' >>> fruits[-1] ' orange ' >>> fruits[-2] ' Banana
3. Slicing
>>> fruits = [' apple '
Selling combs to monks is just like selling ice to eskimoans and gas masks to deer in the forest. Selling all products that customers don't need seems impossible, for most salesmen, it is impossible to produce results. However, for sales promotion experts and sales elites, more acceptable is just a task that is similar to impossible to accomplish and a challenge to surpass themselves. What they want to accomplish is to turn fantasies into ideals, turn the ideal into reality and turn all impossib
of $ lookingFor to "Mary", You will get the message "You 've got it !" -- Because "Mary" is part of $ namesArray.
To count array elements, you can use the count () function:
$ NamesArray = array ("Joe", "Jane", "Bob", "Mary", "Paul", "Eddie", "John ");
$ Count = count ($ namesArray);?>
The $ count value is 7.
You can add elements to any array, whether at the beginning or end of an existing array. You can also use a function to create a new array containing two or more array elements. During me
elements to any array. whether at the beginning or end of an existing array, you can also use a function to create a new array containing two or more array elements, when merging, each array is arranged in the required order. if your array already has an internal order, you need to re-sort the new merged array.
Let's start by adding elements to the end of an existing array and use the array_push () function ():
The code is as follows:
/* Create the original array */$ FruitArray = array ("a
existing array. You can also use a function to create a new array containing two or more array elements. During merging, each array is arranged in the required order. If your array already has internal sorting, you need to re-sort the new merged array.
Let's start by adding elements to the end of an existing array and use the array_push () function ():
$ FruitArray = array ("apple", "orange", "banana", "kiwi", "pear ");
/* Add to the original a
($ lookingFor, $ namesArray )){
Echo "You 've got it! ";
} Else {
Echo "Not found in this array! ";
}
?>
If You change the value of $ lookingFor to Mary, You will get "You 've got it !" Because Mary is an element in the $ namesArray array.
To count the number of elements in an array, simply use the count () function:
$ Count = count ($ namesArray);?>
The returned $ count value is 7.
You can add elements at the beginning or end of an array, or use array_merge () to crea
array. whether at the beginning or end of an existing array, you can also use a function to create a new array containing two or more array elements, when merging, each array is arranged in the required order. if your array already has an internal order, you need to re-sort the new merged array.
Let's start by adding elements to the end of an existing array and use the array_push () function ():
The code is as follows:
/* Create the original array */$ FruitArray = array ("apple", "orange",
array is arranged in the order in which it is needed. If your array already has an internal sort, you need to reorder the new merged array. Let's start with adding elements to the end of an existing array, using the function Array_push ():
Copy CodeThe code is as follows:
/* Create original array */
$fruitArray = Array ("Apple", "orange", "banana", "kiwi", "pear");
/* Add to original array */
Array_push ($fruitArray, "Grape", "pineapple", "tomato")
array, or use array_merge () to create a new array containing two or more elements in the array, the order of elements is arranged in the specified order. If the original array is out of order, it needs to be re-ordered after merging.
We can first use array_push () to add an element at the end of the array:
$ Fruitarray = array ("apple", "orange", "banana", "Kiwi", "Pear ");
/* Add elements to the array */
Array_push ($ fruitarray, "grape", "pineapp
The ordering of several array functions mentioned below has some commonality:The 1 array is used as the parameter of the sort function, and after sorting, the array itself is changed, and the return value of the function is bool type.
2 function name appears single A association, meaning, in the process of ordering by value, maintain the key=>value of the corresponding relationship is unchanged
3 function name in a single K represents key, meaning, in the process of sorting by value according to
$fruits array:
$fruits = Array ("Apple", "banana");
Array_unshift ($fruits, "orange", "pear")
//$fruits = Array ("Orange", "pear", "apple", "banana");
Add an element to the end of an array
The return value of the Array_push () function is int, is the number of elements in the array after the data is pressed, you can pass multiple variables as arguments for this function, and press multiple v
a programming language is not worth learning if you don't have an impact on how you think about programming. . --alan Perlis(Define Rember*(Lambda (a list)(Cond((null? list) ' ())(Atom? (Car list)) (Cond(eq. A (car list)) (rember* A (CDR list))(Else (Cons car list) (rember* A (CDR list)))))(Else (Cons (rember* A (car list)) (rember* A (CDR list))))))(rember* ' Cup ' ((coffee) cup ((tea) cup) (and (Hick)) Cup))(Define Insertr*(Lambda (new old L)(Cond((null? l) ' ())(Atom? (Car L)) (Cond(eq? (car
can add elements to any array. whether at the beginning or end of an existing array, you can also use a function to create a new array containing two or more array elements, when merging, each array is arranged in the required order. if your array already has an internal order, you need to re-sort the new merged array.
Let's start by adding elements to the end of an existing array and use the array_push () function ():
Copy codeThe code is as follows:
/* Create the original array */
$ FruitAr
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.