Typical PHP module development

Source: Internet
Author: User

Registration and login module Learning
1. Constructor

2. Differences between Rand and mt_rand

In general, mt_rand ()RatioRand ()Four times faster

Many old libc random number generators have some uncertain and unknown features and are very slow. PHPRand ()Default function usageLibcRandom number generator.Mt_rand ()A function is replaced by an informal one. This function is usedMersenne TwisterAs a random number generator,Mt_rand ()The average speed of a random value is faster than that provided by libc.Rand ()Four times faster.

3.Mysql_fetch_row -- get a row from the result set
Mysql_fetch_assoc --Retrieve a row from the result set as an associated array
Mysql_fetch_array --Comprehensive Digital Index Associated IndexThe default value is mysql_both. An array containing both join and numeric indexes is obtained.
Mysql_fetch_object -- get a row from the result set as an object

blog module learning
1. database analysis : database design is usually based on an existing database management system !
2. data table structure: database db_mrlog contains 5 data tables of different topics:
tb_user tables (user information data tables)
tb_article table (blog Article table)
tb_filecomment table (article Comment table)
TB-friend (circle of friends information table)
tb_tpsc table (Image Upload table ).

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.