Re: Wan net interview PHP written test
1, print out the time format of the previous day by PHP is 2006-5-10 22:21:21 (2)
answer: echo date ('Y-m-d H:i:s', strtotime ("-1)) Back value (even if not used)
print () can only print a value of a simple type variable (such as int, string)
print_r () can print a value of a complex type variable (such as an array, an object)
echo output one or multiple string
3, a template (1 points) that can make HTML and the partition out of use. Woo, TinyButStrong, Template Lite, Savant, phemplate, XTemplate
5, which tools are used for version control? (1 points)
answer: CVs, SVN, and how to do string flip? (3 points) (4, more write more)
answer:
1, select the most suitable field properties, as far as possible to reduce the length of the definition field, as far as possible to set the field NOT NULL, such as the "province, sex", preferably set to ENUM
2, use the connection (JOIN) to replace the subquery:
a. delete no order clients: DELETE DELETE Fo WHERE CustomerID NOT in (SELECT CustomerID FROM orderinfo)
b. extract all without order customers
WHERE orderinfo.customerid IS NULL
3, using the Federation (UNION) to create a temporary table instead of the manually created temporary table
a.: SELECT name FROM, and transaction processing: to ensure data integrity, such as additions and modifications, both are executed, One failure failed both
mysql_query ("BEGIN");
mysql_query ("INSERT INTO customerinfo (name) VALUES"); A SELECT statement takes out the initial data and updates the new value to the table with UPDATE statements.
LOCK TABLE statements containing the WRITE keyword can ensure that
there will be no other access to the inventory to be inserted, updated, or deleted before the UNLOCK TABLES command is executed. Merid FROM `customerinfo` wheremso-spacerun: yes "