Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-06-05
1
Medium Priority
?
403 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 111

Accepted Solution

by:
Ray Paseur earned 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

772 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