php数组元素大小有限

标签 php mysql komodo

我从数据库获取行,但表的一列名称太大,即“Booking_Physical_Location_Id”

我得到了除最后一个字母“d”之外的列名称。

这是我的代码片段:

$Con = $this->OpenMSSqlConnection($this->DBObject);

$rs = odbc_exec($Con, $q);

$Result = '';
while ($row = odbc_fetch_array($rs))
{
    $Result[] = $row;  
}
unset($rs);    
return $Result;

这是 $row 数组的 var_dump 结果

 array(36) {
  'Booking_Id' =>
  string(15) "103090000000242"
  'Identity_Column' =>
  string(3) "506"
  'Article_Tracking_No' =>
  string(13) "EZ454576987PK"
  'Reference_Id' =>
  NULL
  'Client_Id' =>
  string(15) "103090000000074"
  'Service_Id' =>
  string(1) "2"
  'Delivery_Area_Id' =>
  string(3) "319"
  'To_Location_Id' =>
  string(1) "1"
  'From_Location_Id' =>
  string(3) "308"
  'Booking_Physical_Location_Id' =>
  string(1) "9"
  'Destination_Physical_Location_I' =>
  string(1) "1"
  'Reason_Id' =>
  NULL
  'Total_Charges' =>
  string(1) "0"
  'Article_Status_Id' =>
  string(1) "1"
  'Booking_Date' =>
  string(23) "2015-03-18 10:02:01.803"
  'Booking_Mode_Id' =>
  string(1) "1"
  'Entry_Location_Id' =>
  string(3) "309"
  'Delivery_Date' =>
  NULL
  'Delivery_By' =>
  NULL
  'Delivery_Location_Id' =>
  NULL
  'Delivery_Mode_Id' =>
  NULL
  'Receipient_Title' =>
  string(7) "FGHJGFD"
  'Receipient_Address' =>
  string(5) "GHJHG"
  'Receipient_Contact_No' =>
  string(3) "554"
  'Receipient_Mobile_No' =>
  NULL
  'Article_Wamount' =>
  string(4) "2142"
  'Booking_By' =>
  string(3) "116"
  'Service_Charges_Location_Detail' =>
  NULL
  'Transit_State_Id' =>
  string(1) "2"
  'Received_By' =>
  NULL
  'Shift_Id' =>
  string(1) "1"
  'Commision' =>
  NULL
  'GST' =>
  NULL
  'Other_Charges' =>
  NULL
  'Invoice_Id' =>
  NULL
  'msrepl_tran_version' =>
  string(36) "00000000-0000-0000-0000-000000000000"
}

最佳答案

除了脚本的内存限制之外,PHP 中没有键的长度限制
您的表中有 2 个不同的字段 “Booking_Physical_Location_Id”“Booking_Physical_Location_I”

您可以使用DESC TABLE_NAME来验证这一点

关于php数组元素大小有限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30074484/

相关文章:

windows - 如何在 Komodo 7.1 中启用 mysql 支持?

php - 使用 PHP 将用户信用卡号发送到打印机

php - Zend Framework 2 - ZFCUser 模块安装

php - 如何检查一行中重复的列名并删除具有相同 class_name 的第二行

mysql - 使用mysql删除特定字符后的部分字符串

javascript - javascript 中缩进到下一行

Komodo Edit - 如何将代码完成添加到我的文件

php - 如何在 php 和 javascript 中创建小部件?

php - MYSQL转Google图表(折线图)

MySQL语法错误[Left Join]