The example in this article describes a method for quickly creating a model of a nonstandard name datasheet thinkphp. Share to everyone for your reference. The specific methods are as follows:
Non-standard name datasheets, such as: Cow_archives_4, naming document model data tables such as common Uzibo cms,08cms like named methods, assuming that the data table prefix is configured in the configuration file:
Copy Code code as follows:
<?php
Return Array (
' Configuration item ' => ' config value '
Database configuration
' Db_prefix ' => ' Cow_ ',
);
?>
New Model, Archives4Model.class.php
Copy Code code as follows:
<?php
Class Archives4model extends model{
protected $tableName = ' archives_4 ';
}
?>
D Method Instantiation:
Copy Code code as follows:
$archives 4=d ("Archives4");
$rsdb = $archives 4->select ();
Var_dump ($RSDB);
I hope this article will be helpful to everyone's thinkphp framework program design.