php/mysql回显mysql子字符串
我在phpadmin中检查了我的sql语句,得到了我期望的结果,但是在我的php中,我似乎不知道如何从sql语句中回显子字符串php/mysql回显mysql子字符串,php,mysql,substring,Php,Mysql,Substring,我在phpadmin中检查了我的sql语句,得到了我期望的结果,但是在我的php中,我似乎不知道如何从sql语句中回显子字符串 除了在php中为空的$row->content之外,所有内容都很正常。现在字段的名称是SUBSTRINGcontent,1200,您应该指定要使用的名称,如下所示 SELECT id, title, date, SUBSTRING(content,1,200) as content FROM blog... 但此处可以省略,因此以下内容也适用: SELECT id,
除了在php中为空的$row->content之外,所有内容都很正常。现在字段的名称是SUBSTRINGcontent,1200,您应该指定要使用的名称,如下所示
SELECT id, title, date, SUBSTRING(content,1,200) as content FROM blog...
但此处可以省略,因此以下内容也适用:
SELECT id, title, date, SUBSTRING(content,1,200) content FROM blog...
SELECT id, title, date, SUBSTRING(content,1,200) content FROM blog...