Talking about the "garbage bin" variable table in Drupal

Source: Internet
Author: User
Tags drupal

The recycle bin name is variable.

Use your favorite database management tool to open the drupal Database. If no, the table is variable. This is a famous "waste bin "! Want to use a database? Do not want to create a new table? Ha, in variable! I want to temporarily put a piece of data, haha, in variable! What is this not a waste bin?

Joke enough. Enter the text of today. Today we will talk about variable functions.

The four functions and two tables are the dishes of today!

First course: function variable_initialize ($ conf = array ()){//......}

This function is designed to load and initialize the variable table. The daily usage is not very high. For more information, see.

Dish 2: function variable_set ($ name, $ value ){//......}

This function is very useful! How can we use it to save a temporary data? Do not want to create a new table ?...... In many cases, whenever there is an impulse to put things into the database, the first thing that emerges is it! Save, save, and catch up with the next piece.

Third course: function variable_get ($ name, $ default = NULL ){//......}

This function is no longer very useful ...... How can I read the data stored in the variable table? That's it.

Dish 4: function variable_del ($ name ){//......}

Will you delete the goddess that has been stored in the hard disk? Unless there are too many hard drives for the goddess, they won't go here!

First Tang: variable table

What is the specific table structure ?? R? Ame, a value.

The second decoction: variables record in cache_bootstrap table

Why is there such a thing? More ?? What is the mark? /P>

Everyone likes to drop things in the "waste bin", but what if there are too many things? Don't worry. We have cache to ensure performance. Drupal sets the variable table cache to variables in cache_bootstrap, which greatly improves drupal performance.

How to Set cache? Cache_set!

The above is the "waste bin" in drupal ". Have you learned about it? Does it feel convenient to use drupal with the garbage bin variable?

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.