Jump to content

Column Text Value Issue


scott botkins

Recommended Posts

I've created a database for data to be stored. Each one is stored by an id such as 000001 for the first one. However when I run the search on a internet browser and type in the 000001 it shows up as just "1" instead of "000001" so I'm guessing I have the attributes wrong in database. In phpmyadmin for the field id I have it set for TEXT and not null, do you know what it should be set to fix this error? Thanks!

Link to comment
https://forums.phpfreaks.com/topic/62471-column-text-value-issue/
Share on other sites

I've created a database for data to be stored. Each one is stored by an id such as 000001 for the first one. However when I run the search on a internet browser and type in the 000001 it shows up as just "1" instead of "000001" so I'm guessing I have the attributes wrong in database. In phpmyadmin for the field id I have it set for TEXT and not null, do you know what it should be set to fix this error? Thanks!

 

1) Why do you care how the DB stores this?

2) It should never be TEXT, but rather UNSIGNED INT.

3) If you really care (and you don't) you can use ZEROFILL.

4) You can make it as pretty as you like on the  way out, don't mess up the internal DB storage.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.