欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程语言 > php >内容正文

php

php 不识别 函数,奇怪的PHP错误:函数无法识别自己的参数

发布时间:2023/12/20 php 31 豆豆
生活随笔 收集整理的这篇文章主要介绍了 php 不识别 函数,奇怪的PHP错误:函数无法识别自己的参数 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

我有以下功能:

public function updateCustomerInternetBanking($value, $column_to_go_by)

{

$sql = "

UPDATE customer c

JOIN account_import ai ON c.account_import_id = ai.id

JOIN generic_import gi ON ai.generic_import_id = gi.id

JOIN import_bundle ib ON gi.import_bundle_id = ib.id

SET has_internet_banking = 1

WHERE c.".$column_to_go_by." = ".$this->quote($value)."

AND ib.id = ".$this->quote($this->getId())."

";

$conn = Doctrine_Manager::connection();

$conn->execute($sql);

}当我尝试在开发中运行它时,它工作正常。当我尝试在生产环境中运行它时,我得到以下结果:

PHP Notice: Undefined variable: column_to_go_by in /var/www/mcif/lib/model/doctrine/ImportBundle.class.php on line 655$column_to_go_by如何定义?

正如你所知,这段代码是直接从生产中复制的,我检查了WHERE ...行是655行。

总结

以上是生活随笔为你收集整理的php 不识别 函数,奇怪的PHP错误:函数无法识别自己的参数的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。