Database and Doctrine (reproduced from http://www.111cn.net/phper/332/85987.htm), www.111cn. netphper
The most common and challenging task for any application is to read and persist data information from the database. Although the complete symfony
Note: This series of posts uses the symfony2.7.* framework.
Doctrine
Doctrine2 as a database persistence framework for PHP, it is very popular in foreign countries, in the current PHP field, doctrine is one of the best persistence framework, the
// ================================================ ================================================== Add data to the table member as the table name/*$ Ins_vote_answer = new voteanswer (); // insert data to the vote_answer table$ Ins_vote_answer
Scenarios and BenefitsOnce you are familiar with the Symfony framework, you have a deep sense of the power of the framework-integrated ORM component Doctrine2, and the accompanying data migration is also very convenient. Doctrine2 uses the doctrine
This is a follow-up to a question previously opened, refer to the link
I am using, symfony2 donctrine , inside about the database operation, all used entities, the official recommendation to establish the relationship between table and table, I made
@Controller: Modifier class, used to create an object that handles HTTP requests
@RestController: Spring4 added after the annotation, the original in the @Controller return JSON needs @ResponseBody to mate, if directly with the @RestController
What is the first part of Web cachingScenario 1: When testing a sister's function, it says why my browser's display is a mess, how does my interface differ from other browsers? Next to the person will be reminded that: clear the cache to
Execute command:$ PHP Bin/consoleCheck the command.Symfony version 3.1.5-app/dev/debugusage:command [options] [arguments]options:-H,--help Display this hel P message-q,--quiet do not output no message-v,--version Display This application version--
options:--help-h Display this help information --quiet-q do not output any information --verbose-v Increase the level of detail of the information -- Version-V shows the release number of this program -ANSI
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.