错误如下:
in:
[select customers_info_date_account_created from customers_info where customers_info_id =12345 LIMIT 1 ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
但是单独运行这个SQL,并没有异常。
程序代码:
select('customers_info_date_account_created', 'customers_info', 'customers_info_id =' . 12345, ' LIMIT 1 ');
function select($columns, $table, $where, $oderby = '')
{
global $db;
$return = '';
$sql = "select " . $columns . " from " . $table . " where " . $where . " $oderby ";
$query = $db->Execute($sql);
if ($query->RecordCount()) {
$return = $query->fields[$columns];
}
return $return;
}
db类就不贴了,就是普通的SQL query方法
// db类中调试如下
$resource = @mysql_query($zf_sql, $this->dbLink);
if (!$resource) {
var_dump(@mysql_errno($this->dbLink)); // false
var_dump(@mysql_error($this->dbLink)); // false
}
看你的报错 应该是你生产环境拼装的sql 语句 有问题,应该有 space 之类的字符 影响了sql 的执行。