InMotion Hosting Support Center

When working with SQL queries, either within your php code or when testing or toubleshooting errors via your phpMyADmin, it is helpful to understand the structure of the table you are writing to. If you are updating or adding new rows to tables, you will most definitely need to know the correct data type of the data fields. Attempting to add a value of one data type to a field that is expecting another can result in a syntax error. This guide will show you how to find the correct data type for data fields (columns) via phpMyAdmin.

Finging the data type for data columns in phpMyAdmin

  1. First, log into your cPanel interface.
  2. click on the phpmyadmin tool iconLocate the Databases category and click on the phpMyAdmin icon.
  3. select which database to work withOnce on the main screen for phpMyAdmin you will see a list of databases in the left hand side panel. Click on the database you want to work with.
  4. click on the structure linkThe next screen displays the table names for the database in both the left hand and right hand panels. Look to the right hand panel and locate the table you will be working with. Next to each table are several links. Click on the Structure link for your table. For our example, we will be looking into the wp_users table.
  5. locate the column data typeYou are now taken to a screen that displays the data columns and their details for the selected table. Looking at the labels across the top, you will notice a column named Type. This column lists the data type for the data fields.

    Most of the types have a number after the type. This is the maximum number of characters the field will allow. For example, VarChar(255) means it is a varChar field (alphanumeric) and can have up to 255 characters.
Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!