最近Thinkphp6框架出来了,Mysql 8.0也出来了,php版本也升级到了7.4(这里php使用的是php7.3) 为了赶上时代的潮流,连ide(phpstorm)也升级到了2019.2的版本 以下是本机所使用的环境及版本(phpstudy也是新ui 8.0) 对于数据库的配置在框架中app\config\database.php中已经配置好了,所以下面将默认已经连接上了数据库 作为例子展示的数据表: 首先是 1.原生查询操作的读操作:query() public function de
--关于null在oracle数据库中是否参与计算,进行验证,with td as (select null id,1 name from dual ),td1 as ( select null id,2 name from dual ) select * from td, td1 where nvl(td.id,'0.00') = '0' select '1'||'0.1' from dual number number -> char select to_char(3333.00,'999,
在程序中,从数据库中读取到的日期时间类型数据一般是这种格式:"/Date(1355109408000+0800)/" 要经过js函数处理变为格式:'2012-12-10 11:05:21' 用此js函数即可搞定: function timeFormatter(value) { var da = new Date(parseInt(value.replace("/Date(", "").replace(")/" , "