> >

Re: Wan net interview PHP written test

time:15-08-17 forum:PHP tools and code
  47, complete the following:
(1) create a news release system, the table named message has the following fields (3)
ID article id
title article title
content article content
category_id article classification id
hits click / answer: T NULL auto_increment,
'title' varchar (200) default NULL,
content 'text,
> > > > = > (two) the same news release system: table recording user Reply content, the field is as follows (4 points)
comment_id reply id
ID article ID, id
comment_content reply content
in the associated message table, and now the following format is required to get the list of article titles in the following format by querying the database, and sort by the number of replies, and reply the highest to the top Article ID article title click volume reply
use a SQL statement to complete the above query, if the article does not reply then the reply number is shown as 0
answer: SELECT message.id ID, message.title title, IF, IF (message.`hits`, 0, *)) BER FROM message LEFT JOIN
comment ON message.id=comment.id GROUP BY message.`id`;
(three) the above content management system, table save classification information, field as follows (3 points) / > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > When the user enters the article, by selecting the drop-down menu, the selected article classification
writes how to implement the drop-down menu
answer: function categoryList ()
{
$result=mysql_query ("select category_id, categroy_name from category")); ("
  • 1
  • 2
  • 3
  • 4

prev:The couple rubbed their shoes for 28 yea... next:Ji'nan street snacks are mostly black li...
post comments
Notice



Approved   The great uncle of the dorm was atta...   The central government issued the me...   Ji'nan han zi donate marrow to save ...   One arm old man worked for 16 years ...   The old man takes care of the paraly...
rand   Using JSON to implement cross domain...   PHP good verification code   PHP upload file code, suitable for b...   Install.php simple production   The use of UBB in PHP
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com