Home Backend Development PHP Tutorial 新手求解:感觉thinkphp的模型很鸡肋,该如何解决

新手求解:感觉thinkphp的模型很鸡肋,该如何解决

Jun 13, 2016 am 11:04 AM
model nbsp sql thinkphp

新手求解:感觉thinkphp的模型很鸡肋
很少有单表的用法啊,基本上都是关联n多表,用模型我都不知道该实例化哪个,完了还得写一大堆sql语句,它里边的那些curd命令根本不够看
------解决方案--------------------
其实框架都差不错,负责的自己写sql。
------解决方案--------------------
没用过tp,不过记忆中tp的M方法不就是一个单表的模型么,很久前看过了,记错了忽视我这条回复
------解决方案--------------------
1、框架是应用程序的模板,你都没搞清楚他是否符合你的需求就去用。除了问题可是不能怪人家的
2、tp 的模型就是一个表结构,具体做什么自然是你自己弄的
3、所有的框架都把表作为 Model,也就伴生了无法逾越的障碍:多表关联
太个性了,任谁都无法抽象

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the difference between HQL and SQL in Hibernate framework? What is the difference between HQL and SQL in Hibernate framework? Apr 17, 2024 pm 02:57 PM

What is the difference between HQL and SQL in Hibernate framework?

10 Ways to Adjust Brightness on Windows 11 10 Ways to Adjust Brightness on Windows 11 Dec 18, 2023 pm 02:21 PM

10 Ways to Adjust Brightness on Windows 11

How to turn off private browsing authentication for iPhone in Safari? How to turn off private browsing authentication for iPhone in Safari? Nov 29, 2023 pm 11:21 PM

How to turn off private browsing authentication for iPhone in Safari?

Usage of division operation in Oracle SQL Usage of division operation in Oracle SQL Mar 10, 2024 pm 03:06 PM

Usage of division operation in Oracle SQL

What does the identity attribute in SQL mean? What does the identity attribute in SQL mean? Feb 19, 2024 am 11:24 AM

What does the identity attribute in SQL mean?

Comparison and differences of SQL syntax between Oracle and DB2 Comparison and differences of SQL syntax between Oracle and DB2 Mar 11, 2024 pm 12:09 PM

Comparison and differences of SQL syntax between Oracle and DB2

How to run thinkphp project How to run thinkphp project Apr 09, 2024 pm 05:33 PM

How to run thinkphp project

Detailed explanation of the Set tag function in MyBatis dynamic SQL tags Detailed explanation of the Set tag function in MyBatis dynamic SQL tags Feb 26, 2024 pm 07:48 PM

Detailed explanation of the Set tag function in MyBatis dynamic SQL tags

See all articles