Solved

drupal schema type int length 3 but get int(10)

Posted on 2013-06-05
1
386 Views
Last Modified: 2013-07-10
want to have a int(3) field.
In drupal schema, define as:
      'response_code' => array(
        'description' => 'The API response code',
        'type' => 'int',
        'length' => 3,
        'unsigned' => TRUE,
        'not null' => FALSE,
      ),

But it creates int(10) field in mysql database.
CREATE TABLE `log` (
  `response_code` int(10) unsigned DEFAULT NULL,
)
0
Comment
Question by:drupal_100
1 Comment
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39222156
Length of an INT is not really relevant.  Integers are numbers and they don't have any inherent length.  They have maximum and minimum values.  Strings have length.

Why does this matter to you?  There might be a different approach, if we understand your concern about a length of 3.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access Object's Property 9 22
Method for submitting dynamically created rows 20 18
php function to remove a file 31 18
PHP populating an array. 4 5
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now