Home >Backend Development >PHP Tutorial >PHP interview questions and answers sharing
3.
4, Company interview questions: Baidu web development engineer written test questions】 Part one: 1. Explain the meaning of the following statement: document.form["formname"].submit; 2. There are the following statements: Write code so that when the mouse moves over the text box, the content in the text box is automatically selected. 3. Convert character 09 into decimal number. 4. Convert 1234567890 into 1,234,567,890 by separating every 3 digits with commas. 5. I forgot about html and css. 6. Enter a year in the text box, determine its zodiac sign, and output it next to the text box. Both html and javaservlet are required to be written. 7.ajax retrieves data from the server {id:123, name:"baidu", username:"mm",checked:true}; Analyze the value corresponding to name ("baidu"). (The question is long, I can’t remember) 8. Talk about customer experience. (Edited and compiled by Scripting School bbs.it-home.org) Answer: 1. Get the formname form submit button element. 2, 3、
6,
case " ": break;...
} 4. Database optimization:
There is a table product(id,name,price,count);
When executing the following query, the speed is always very slow:
select * from product where price=100;
Adding a non-clustered index to the price field, the query speed is still very slow.
(1) Analyze the reasons for slow query.
(2) How to optimize.
5.
create table topid{ topicid int not null primary key auto_increment,title text, author varchar(30),content blob, isdeleted int...... //It seems An index is defined on author }create table reply{ topicid int foreign key,replyid int primary key auto_increment, replyauthor varchar(30), Copy code
What are the shortcomings of the above query statement in terms of performance? How to optimize? Answer: 1. The database trigger and interrupt mechanism are automatically completed by the database, while the ajax trigger is triggered by the user. Ajax optimizes the GUI and the database asynchronously. 2.
|