是否可以将PHP XML导出器转换为Wordpress插件?
我使用mysql1制作了一个PHP脚本,其中包含一个表单,可用于将数据从数据库导出到XML文件。我的问题是,我可以把它用作Wordpress插件吗是否可以将PHP XML导出器转换为Wordpress插件?,php,xml,wordpress,Php,Xml,Wordpress,我使用mysql1制作了一个PHP脚本,其中包含一个表单,可用于将数据从数据库导出到XML文件。我的问题是,我可以把它用作Wordpress插件吗 As you know, mysql_fetch_assoc() processes the results returned by mysql_query(). $wpdb class methods typically return results of a query to the wordpress database similar to w
As you know, mysql_fetch_assoc() processes the results returned by mysql_query(). $wpdb class methods typically return results of a query to the wordpress database similar to what mysql_query() would do. $wpdb class methods do not process such results as mysql_fetch_assoc() would do, so there is no true equivalent.
我面临的最大问题是wordpress使用$wpdb与数据库交互,就像我一直使用的PHP MySQL函数一样。有没有办法将PHP脚本转换成wordpress插件
As you know, mysql_fetch_assoc() processes the results returned by mysql_query(). $wpdb class methods typically return results of a query to the wordpress database similar to what mysql_query() would do. $wpdb class methods do not process such results as mysql_fetch_assoc() would do, so there is no true equivalent.
我通常对$wpdb查询的结果执行的操作与您的示例类似:
foreach($结果为$行){
//在此处执行代码以处理db结果