php数组元素大小有限

时间:2015-05-06 10:44:57

标签: php mysql komodo

我从数据库获取行但是表的一个列名太大,即#34; 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 array

的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"
}

1 个答案:

答案 0 :(得分:0)

除了脚本的内存限制外,php中没有密钥的长度限制 您的表中有2个不同的字段 'Booking_Physical_Location_Id''Booking_Physical_Location_I'

您可以使用DESC TABLE_NAME

进行验证